diff options
author | Thomas Gschwantner <tharre3@gmail.com> | 2019-12-11 03:58:04 +0100 |
---|---|---|
committer | Thomas Gschwantner <tharre3@gmail.com> | 2019-12-11 06:22:17 +0100 |
commit | f10e95340d9b99942fc594b642c4afcd829beed9 (patch) | |
tree | 329d5e2a827e8f0a6ac9ac214c9a14e1d7dca3af /common.h | |
parent | Postpone freeing memory for leases until after updating allowedips (diff) | |
download | wg-dynamic-f10e95340d9b99942fc594b642c4afcd829beed9.tar.xz wg-dynamic-f10e95340d9b99942fc594b642c4afcd829beed9.zip |
Change request_ip protocol
ipv4 and ipv6 keys have been combined into one common key, ip. To
distinguish between multiple IPs in later versions ip=0.0.0.0/32 and
ip=::/128 respectively now mean we want to be assigned a random address
from the server.
Releasing/not wanting an IP is now done by just not listing that IP,
i.e. if we only wanted an (random) ipv4 address the request would look
as follows:
request_ip=1
ip=0.0.0.0/32
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -29,8 +29,7 @@ static const uint16_t WG_DYNAMIC_PORT = 970; /* ASCII sum of "wireguard" */ E(WGKEY_REQUEST_IP, "request_ip") \ E(WGKEY_ENDCMD, "") \ /* CMD END */ \ - E(WGKEY_IPV4, "ipv4") \ - E(WGKEY_IPV6, "ipv6") \ + E(WGKEY_IP, "ip") \ E(WGKEY_LEASESTART, "leasestart") \ E(WGKEY_LEASETIME, "leasetime") \ E(WGKEY_ERRNO, "errno") \ |