diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-11-29 16:55:16 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-11-29 16:55:16 -0800 |
commit | 93097c2dc51c8b7b2b4e75f274622b2259477bba (patch) | |
tree | ac6da121bb0d6148ba5478dea48352e7e45e15fb | |
parent | da3ce0147736b98d0b9861693b73d598c2968906 (diff) | |
parent | f790ecbc1151161be94f83f2a30258ff32ecfef9 (diff) | |
download | vyatta-cfg-quagga-93097c2dc51c8b7b2b4e75f274622b2259477bba.tar.gz vyatta-cfg-quagga-93097c2dc51c8b7b2b4e75f274622b2259477bba.zip |
Merge branch 'mendocino' of vm:rel/vyatta-cfg-system into mendocino
-rwxr-xr-x | scripts/system/vyatta_interface_rescan | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/system/vyatta_interface_rescan b/scripts/system/vyatta_interface_rescan index bdc8fd67..a33f8ee9 100755 --- a/scripts/system/vyatta_interface_rescan +++ b/scripts/system/vyatta_interface_rescan @@ -45,11 +45,15 @@ my %whitelist = ( sub persistent_address { my $mac = shift; - # is local assignment bit (IEEE802) not set? - return 1 unless ($mac =~ /^.[2367abef]:/); + return if ($mac eq '00:00:00:00:00:00'); # zero address is reserved - # is address bogus? - return if ($mac eq '00:00:00:00:00:00'); + # get first octet + return unless ($mac =~ /^([0-9a-f][0-9a-f]):/); + my $oct0 = hex($1); + + return if ($oct0 & 0x1); # skip it is a multicast address + + return 1 unless ($oct0 & 0x2); # this is good, not locally assigned # unless it is in whitelist, it is non persistent $mac =~ /^([0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]:[0-9a-f][0-9a-f])/; |