Add a few MAC checks

Notably mac.is_multicast() which is needed for TAPs / LCPs and
interfaces.

Add a test for interface MAC addresses being non-multicast.
This commit is contained in:
Pim van Pelt
2022-04-09 14:16:27 +00:00
parent 1a00f14b53
commit 92a20d0755
5 changed files with 93 additions and 0 deletions

View File

@ -0,0 +1,17 @@
test:
description: "Interface mac addresses cannot be multicast"
errors:
expected:
- "interface .* MAC address .* cannot be multicast"
count: 1
---
interfaces:
GigabitEthernet3/0/0:
description: "Cool, local MACs are fine"
mac: 02:00:00:00:00:00
GigabitEthernet3/0/1:
description: "Cool, global unicast MACs are fine"
mac: 04:00:00:00:00:00
GigabitEthernet3/0/2:
description: "Not cool, multicast MACs"
mac: 01:00:00:00:00:00