Do bounds checking on the BondEthernet and VXLAN Tunnel instances

This commit is contained in:
Pim van Pelt
2022-04-03 14:40:44 +00:00
parent 79f41d447d
commit 720f581e47
4 changed files with 60 additions and 0 deletions

View File

@ -70,6 +70,10 @@ def validate_bondethernets(yaml):
result = False
else:
bond_mtu = interface.get_mtu(yaml, bond_ifname)
instance = int(ifname[12:])
if instance > 4294967294:
msgs.append("bondethernet %s has instance %d which is too large" % (ifname, instance))
result = False
for member in iface['interfaces']:
if (None, None) == interface.get_by_name(yaml, member):