Assert that target unnumbered interfaces AND loopbacks also cannot be unnumbered
This commit is contained in:
@ -530,7 +530,7 @@ def validate_interfaces(yaml):
|
||||
f"interface {ifname} unnumbered target {target} cannot be in L2 mode"
|
||||
)
|
||||
result = False
|
||||
if is_unnumbered(yaml, target):
|
||||
if is_unnumbered(yaml, target) or loopback.is_unnumbered(yaml, target):
|
||||
msgs.append(
|
||||
f"interface {ifname} unnumbered target {target} cannot also be unnumbered"
|
||||
)
|
||||
@ -692,7 +692,7 @@ def validate_interfaces(yaml):
|
||||
f"sub-interface {sub_ifname} unnumbered target {target} cannot be in L2 mode"
|
||||
)
|
||||
result = False
|
||||
if is_unnumbered(yaml, target):
|
||||
if is_unnumbered(yaml, target) or loopback.is_unnumbered(yaml, target):
|
||||
msgs.append(
|
||||
f"sub-interface {sub_ifname} unnumbered target {target} cannot also be unnumbered"
|
||||
)
|
||||
|
@ -113,7 +113,7 @@ def validate_loopbacks(yaml):
|
||||
f"loopback {ifname} unnumbered target {target} does not exist"
|
||||
)
|
||||
result = False
|
||||
if is_unnumbered(yaml, target):
|
||||
if is_unnumbered(yaml, target) or interface.is_unnumbered(yaml, target):
|
||||
msgs.append(
|
||||
f"loopback {ifname} unnumbered target {target} cannot also be unnumbered"
|
||||
)
|
||||
|
Reference in New Issue
Block a user