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:
2026-05-06 11:11:03 +03:00
parent 17961e7079
commit ca6a3339b9
+1 -1
View File
@@ -564,7 +564,7 @@ def peer_enable(peer_id: int):
name = item.get("name", "")
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 ""
psk = item.get("peer_psk", "") or ""
if not (name and pk):