From 39b78db3e8b20eb491048b93431b822e8b6a0ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Wed, 22 Jul 2026 19:18:48 -0300 Subject: [PATCH] fix(networks): skip nexthop and default lines when parsing IPv6 routes `ip -6 route` output for ECMP/multipath routes carries `nexthop` continuation lines, and a `default` route has no network prefix. donets() treated both as networks and added bogus entries to the networks table. Skip them alongside the existing link-local/unreachable/via/lo filtering. Recovered from the unmerged lenovobuild branch (original 7094ba0c). Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com> (cherry picked from commit c97e973f36e446fa725ab831299f11ff34ba0510) --- xCAT-server/lib/xcat/plugins/networks.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/networks.pm b/xCAT-server/lib/xcat/plugins/networks.pm index e8e1e9bf2..7ada4db2a 100644 --- a/xCAT-server/lib/xcat/plugins/networks.pm +++ b/xCAT-server/lib/xcat/plugins/networks.pm @@ -388,7 +388,7 @@ sub donets foreach (@ip6table) { my @ent = split /\s+/, $_; - if ($ent[0] =~ m/^fe80::/ or $ent[0] eq 'unreachable' or + if ($ent[0] =~ m/^fe80::/ or $ent[0] eq 'unreachable' or $ent[1] eq 'nexthop' or $ent[0] eq 'default' or $ent[1] eq 'via' or $ent[2] eq 'lo') { #Do not contemplate link-local, unreachable, gatewayed networks,