Ensure that when the sub-int is L3, exact-match must be true

This commit is contained in:
Pim van Pelt
2022-03-13 12:19:38 +00:00
parent 17831dafc3
commit e7e957ed5f

View File

@ -124,6 +124,8 @@ def valid_encapsulation(yaml, sub_ifname):
return False return False
if 'inner-dot1q' in encap and not ('dot1ad' in encap or 'dot1q' in encap): if 'inner-dot1q' in encap and not ('dot1ad' in encap or 'dot1q' in encap):
return False return False
if 'exact-match' in encap and encap['exact-match'] == False and is_l3(yaml, sub_ifname):
return False
return True return True