summaryrefslogtreecommitdiff
path: root/net/amnezia-tools/files/patch-ipc-uapi.h
blob: cbf4811ca8a77c9565f72942324a76e2dbd63400 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
--- ipc-uapi.h.orig	2025-09-03 14:11:13 UTC
+++ ipc-uapi.h
@@ -126,7 +126,7 @@ static int userspace_set_device(struct wgdevice *dev)
 					continue;
 			} else
 				continue;
-			fprintf(f, "allowed_ip=%s/%d\n", ip, allowedip->cidr);
+			fprintf(f, "allowed_ip=%s%s/%d\n", (allowedip->flags & WGALLOWEDIP_REMOVE_ME) ? "-" : "", ip, allowedip->cidr);
 		}
 	}
 	fprintf(f, "\n");