@@ -19,11 +19,13 @@ var parseMACTests = []struct {
1919 {"00:00:5e:00:53:01" , HardwareAddr {0x00 , 0x00 , 0x5e , 0x00 , 0x53 , 0x01 }, "" },
2020 {"00-00-5e-00-53-01" , HardwareAddr {0x00 , 0x00 , 0x5e , 0x00 , 0x53 , 0x01 }, "" },
2121 {"0000.5e00.5301" , HardwareAddr {0x00 , 0x00 , 0x5e , 0x00 , 0x53 , 0x01 }, "" },
22+ {"00005e005301" , HardwareAddr {0x00 , 0x00 , 0x5e , 0x00 , 0x53 , 0x01 }, "" },
2223
2324 // See RFC 7042, Section 2.2.2.
2425 {"02:00:5e:10:00:00:00:01" , HardwareAddr {0x02 , 0x00 , 0x5e , 0x10 , 0x00 , 0x00 , 0x00 , 0x01 }, "" },
2526 {"02-00-5e-10-00-00-00-01" , HardwareAddr {0x02 , 0x00 , 0x5e , 0x10 , 0x00 , 0x00 , 0x00 , 0x01 }, "" },
2627 {"0200.5e10.0000.0001" , HardwareAddr {0x02 , 0x00 , 0x5e , 0x10 , 0x00 , 0x00 , 0x00 , 0x01 }, "" },
28+ {"02005e1000000001" , HardwareAddr {0x02 , 0x00 , 0x5e , 0x10 , 0x00 , 0x00 , 0x00 , 0x01 }, "" },
2729
2830 // See RFC 4391, Section 9.1.1.
2931 {
@@ -53,6 +55,15 @@ var parseMACTests = []struct {
5355 },
5456 "" ,
5557 },
58+ {
59+ "00000000fe8000000000000002005e1000000001" ,
60+ HardwareAddr {
61+ 0x00 , 0x00 , 0x00 , 0x00 ,
62+ 0xfe , 0x80 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
63+ 0x02 , 0x00 , 0x5e , 0x10 , 0x00 , 0x00 , 0x00 , 0x01 ,
64+ },
65+ "" ,
66+ },
5667
5768 {"ab:cd:ef:AB:CD:EF" , HardwareAddr {0xab , 0xcd , 0xef , 0xab , 0xcd , 0xef }, "" },
5869 {"ab:cd:ef:AB:CD:EF:ab:cd" , HardwareAddr {0xab , 0xcd , 0xef , 0xab , 0xcd , 0xef , 0xab , 0xcd }, "" },
@@ -78,6 +89,7 @@ var parseMACTests = []struct {
7889 {"01:02-03-04-05-06" , nil , "invalid MAC address" },
7990 {"0123:4567:89AF" , nil , "invalid MAC address" },
8091 {"0123-4567-89AF" , nil , "invalid MAC address" },
92+ {"0123456789AF0" , nil , "invalid MAC address" },
8193}
8294
8395func TestParseMAC (t * testing.T ) {
0 commit comments