mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-20 10:16:42 -06:00
broadcast error fixes for ipv6 and /31/32
This commit is contained in:
parent
43235f143d
commit
22a0ce3f76
@ -370,7 +370,7 @@ class IPAddressForm(TenancyForm, NetBoxModelForm):
|
||||
raise ValidationError(msg)
|
||||
if address.version == 6 and address.prefixlen not in (127, 128):
|
||||
raise ValidationError(msg)
|
||||
if address.ip == address.broadcast:
|
||||
if address.version == 4 and address.ip == address.broadcast and address.prefixlen not in (31, 32):
|
||||
msg = f"{address} is a broadcast address, which may not be assigned to an interface."
|
||||
raise ValidationError(msg)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user