From bc84ba3ae6b5efc078df932fdfb95656f64f5b0f Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 2 Sep 2018 18:39:04 -0600 Subject: 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. --- src/uapi/wireguard.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/uapi/wireguard.h') 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) -- cgit v1.2.3-59-g8ed1b