summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-29 16:55:16 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-29 16:55:16 -0800
commit93097c2dc51c8b7b2b4e75f274622b2259477bba (patch)
treeac6da121bb0d6148ba5478dea48352e7e45e15fb
parentda3ce0147736b98d0b9861693b73d598c2968906 (diff)
parentf790ecbc1151161be94f83f2a30258ff32ecfef9 (diff)
downloadvyatta-cfg-quagga-93097c2dc51c8b7b2b4e75f274622b2259477bba.tar.gz
vyatta-cfg-quagga-93097c2dc51c8b7b2b4e75f274622b2259477bba.zip
Merge branch 'mendocino' of vm:rel/vyatta-cfg-system into mendocino
-rwxr-xr-xscripts/system/vyatta_interface_rescan12
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])/;