Assert that bd0 is reserved

This commit is contained in:
Pim van Pelt
2022-03-26 11:25:13 +00:00
parent abbabcf2d0
commit 660cccd14e
2 changed files with 7 additions and 1 deletions

View File

@ -122,6 +122,10 @@ def validate_bridgedomains(yaml):
bd_mtu = 1500
if 'mtu' in iface:
bd_mtu = iface['mtu']
instance = int(ifname[2:])
if instance == 0:
msgs.append("bridgedomain %s is reserved" % ifname)
result = False
if 'addresses' in iface and not 'lcp' in iface:
msgs.append("bridgedomain %s has an address but no LCP" % ifname)