mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2025-08-26 13:21:14 +00:00
Peer list with details
This commit is contained in:
@@ -30,6 +30,9 @@ class PeerAllowedIPForm(forms.ModelForm):
|
||||
priority = cleaned_data.get('priority')
|
||||
allowed_ip = cleaned_data.get('allowed_ip')
|
||||
netmask = cleaned_data.get('netmask')
|
||||
if allowed_ip is None:
|
||||
raise forms.ValidationError("Please provide a valid IP address.")
|
||||
|
||||
wireguard_network = ipaddress.ip_network(f"{self.current_peer.wireguard_instance.address}/{self.current_peer.wireguard_instance.netmask}", strict=False)
|
||||
|
||||
if priority == 0:
|
||||
|
Reference in New Issue
Block a user