Commit 87729da8 authored by David G Andersen's avatar David G Andersen

Added colon and period stripping so people can enter MAC

addresses as 00:60:F5:04:00:53 (for instance)
parent cda411c0
......@@ -306,6 +306,8 @@ sub ParseArgs {
if ($s eq "100") { $s="speed100Mbit";}
$n=0;
while(@vlan != 0 && $n < @vlan) {
# Allow people to specify addresses with colons or dots
$vlan[$n] =~ s/[:\.]//g;
die("Invalid MAC Address ",$vlan[$n],". Must be 6 byte Hex value.\n")
if (!(($vlan[$n]=~/^([a-f]|\d)*$/i)&&(length ($vlan[$n])== 12)));
$n++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment