aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/uapi/wireguard.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-02 18:39:04 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-02 23:59:44 -0600
commitbc84ba3ae6b5efc078df932fdfb95656f64f5b0f (patch)
tree916e8481270f5abd13f27ffd071ff57e1f418e2b /src/uapi/wireguard.h
parentcurve25519-arm: prefix immediates with # (diff)
downloadwireguard-monolithic-historical-bc84ba3ae6b5efc078df932fdfb95656f64f5b0f.tar.xz
wireguard-monolithic-historical-bc84ba3ae6b5efc078df932fdfb95656f64f5b0f.zip
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.
Diffstat (limited to 'src/uapi/wireguard.h')
-rw-r--r--src/uapi/wireguard.h6
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)