2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-08-03 16:06:59 +00:00

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 c97e973f36)
This commit is contained in:
Vinícius Ferrão
2026-07-22 19:18:48 -03:00
committed by github-actions[bot]
parent 96484651b9
commit 39b78db3e8
+1 -1
View File
@@ -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,