fix: pass client_address with CIDR mask to wg-peerctl on enable
Stripping /32 caused AllowedIPs without mask in wg0.conf. wg-peerctl needs full CIDR notation for AllowedIPs to be correct. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -564,7 +564,7 @@ def peer_enable(peer_id: int):
|
|||||||
|
|
||||||
name = item.get("name", "")
|
name = item.get("name", "")
|
||||||
pk = item.get("public_key", "")
|
pk = item.get("public_key", "")
|
||||||
addr = (item.get("client_address", "") or "").split("/")[0] # strip /32 if present
|
addr = (item.get("client_address", "") or "")
|
||||||
routes = item.get("advertised_routes", "") or ""
|
routes = item.get("advertised_routes", "") or ""
|
||||||
psk = item.get("peer_psk", "") or ""
|
psk = item.get("peer_psk", "") or ""
|
||||||
if not (name and pk):
|
if not (name and pk):
|
||||||
|
|||||||
Reference in New Issue
Block a user