mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-08-03 16:06:59 +00:00
fix(networks): exclude every link-local address from the networks table
donets() only skips the exact address 'fe80::/64' when scanning routes, so a link-local route with any other prefix (e.g. a longer fe80:: subnet) is added to the networks table as a bogus network. Match any fe80:: prefix instead of the single literal value. Recovered from the unmerged lenovobuild branch (original8b79cf85). Co-authored-by: Jarrod Johnson <10814490+jjohnson42@users.noreply.github.com> (cherry picked from commitd2be0c3865)
This commit is contained in:
committed by
github-actions[bot]
parent
36823339b3
commit
96484651b9
@@ -388,7 +388,7 @@ sub donets
|
||||
foreach (@ip6table)
|
||||
{
|
||||
my @ent = split /\s+/, $_;
|
||||
if ($ent[0] eq 'fe80::/64' or $ent[0] eq 'unreachable' or
|
||||
if ($ent[0] =~ m/^fe80::/ or $ent[0] eq 'unreachable' or
|
||||
$ent[1] eq 'via' or $ent[2] eq 'lo') {
|
||||
|
||||
#Do not contemplate link-local, unreachable, gatewayed networks,
|
||||
|
||||
Reference in New Issue
Block a user