summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-interfaces.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index 30b35c05..26f2791a 100755
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -255,10 +255,10 @@ sub is_valid_mac {
($#octets == 5) or die "Error: wrong number of octets: $#octets\n";
- (($octets[0] & 1) == 0) or die "Error: $mac is a multicast address\n";
+ ((hex($octets[0]) & 1) == 0) or die "Error: $mac is a multicast address\n";
my $sum = 0;
- $sum += strtoul('0x' . $_) foreach @octets;
+ $sum += hex( $_) foreach @octets;
( $sum != 0 ) or die "Error: zero is not a valid address\n";
exit 0;