summaryrefslogtreecommitdiff
path: root/net/amnezia-tools/files/patch-ipc-uapi.h
blob: 61df9f69e784496cfde8a025b6b6770edf7d2071 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
--- ipc-uapi.h.orig	2024-10-01 13:02:42 UTC
+++ ipc-uapi.h
@@ -111,7 +111,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");