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:
@ -18,6 +18,7 @@ import config.loopback as loopback
|
||||
import config.vxlan_tunnel as vxlan_tunnel
|
||||
import config.lcp as lcp
|
||||
import config.address as address
|
||||
import config.mac as mac
|
||||
|
||||
def get_qinx_parent_by_name(yaml, ifname):
|
||||
""" Returns the sub-interface which matches a QinAD or QinQ outer tag, or None,None
|
||||
@ -424,6 +425,10 @@ def validate_interfaces(yaml):
|
||||
if not 'state' in iface:
|
||||
iface['state'] = 'up'
|
||||
|
||||
if 'mac' in iface and mac.is_multicast(iface['mac']):
|
||||
msgs.append("interface %s MAC address %s cannot be multicast" % (ifname, iface['mac']))
|
||||
result = False
|
||||
|
||||
iface_mtu = get_mtu(yaml, ifname)
|
||||
iface_lcp = get_lcp(yaml, ifname)
|
||||
iface_address = has_address(yaml, ifname)
|
||||
|
Reference in New Issue
Block a user