diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-02 18:39:04 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-02 23:59:44 -0600 |
commit | e3284e370e8bfa6f95549612265b16208a21b56a (patch) | |
tree | 5073b382efbed77749e8fffb6e56886667cd6c47 /src/uapi | |
parent | 24a1007e2dde304868e59b3301e23db11df679f2 (diff) |
netlink: insert peer version placeholder
While we don't want people to ever use old protocols, people will
complain if the API "changes", so explicitly make the unset protocol
mean the latest, and add a dummy mechanism of specifying the protocol on
a per-peer basis, which we hope nobody actually ever uses.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/uapi')
-rw-r--r-- | src/uapi/wireguard.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/uapi/wireguard.h b/src/uapi/wireguard.h index 8b8a1f2..90b1c1f 100644 --- a/src/uapi/wireguard.h +++ b/src/uapi/wireguard.h @@ -47,6 +47,7 @@ * 2: NLA_NESTED * ... * ... + * WGPEER_A_PROTOCOL_VERSION: NLA_U32 * 1: NLA_NESTED * ... * ... @@ -101,6 +102,10 @@ * 2: NLA_NESTED * ... * ... + * WGPEER_A_PROTOCOL_VERSION: NLA_U32, should not be set or used at all by most + * users of this API, as the most recent protocol + * will be used when this is unset. Otherwise, must + * be set to 1. * 1: NLA_NESTED * ... * ... @@ -166,6 +171,7 @@ enum wgpeer_attribute { WGPEER_A_RX_BYTES, WGPEER_A_TX_BYTES, WGPEER_A_ALLOWEDIPS, + WGPEER_A_PROTOCOL_VERSION, __WGPEER_A_LAST }; #define WGPEER_A_MAX (__WGPEER_A_LAST - 1) |