Development
This commit is contained in:
parent
f257070095
commit
b35df8fce7
1 changed files with 7 additions and 0 deletions
|
|
@ -158,6 +158,13 @@ def networklayout_tablevlans_edit():
|
|||
is_vpn = existing.get('is_vpn', False)
|
||||
final_mask = subnet_mask if subnet_mask is not None else existing.get('subnet_mask', 24)
|
||||
|
||||
if identity_ips:
|
||||
_vlan_net = ipaddress.IPv4Network(f'{subnet}/{final_mask}', strict=False)
|
||||
for _ip in identity_ips:
|
||||
if ipaddress.IPv4Address(_ip) not in _vlan_net:
|
||||
flash(f"Server identity IP '{_ip}' is not in the VLAN subnet ({subnet}/{final_mask}).", 'error')
|
||||
return redirect(VIEW)
|
||||
|
||||
vlan_id = validate.derive_vlan_id(subnet, final_mask)
|
||||
if vlan_id is None:
|
||||
flash('Cannot derive a valid VLAN ID (1-4094) from this subnet/prefix combination.', 'error')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue