diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-07-08 13:59:04 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-07-08 13:59:38 +0200 |
commit | cb0804a5f0ea650a8ab4068058801d7f17917294 (patch) | |
tree | bbfc3fc3d8e3bdda9f4dfc0388e20528f1d6cc3e /src/uapi/wireguard.h | |
parent | 87b809b88e1bf41a9c142d22a6e29f08d992ca41 (diff) |
netlink: enforce that unused bits of flags are zero
Reported-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/uapi/wireguard.h')
-rw-r--r-- | src/uapi/wireguard.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/uapi/wireguard.h b/src/uapi/wireguard.h index 912f216..5a3e5a7 100644 --- a/src/uapi/wireguard.h +++ b/src/uapi/wireguard.h @@ -142,7 +142,8 @@ enum wg_cmd { #define WG_CMD_MAX (__WG_CMD_MAX - 1) enum wgdevice_flag { - WGDEVICE_F_REPLACE_PEERS = 1U << 0 + WGDEVICE_F_REPLACE_PEERS = 1U << 0, + __WGDEVICE_F_ALL = WGDEVICE_F_REPLACE_PEERS }; enum wgdevice_attribute { WGDEVICE_A_UNSPEC, @@ -160,7 +161,8 @@ enum wgdevice_attribute { enum wgpeer_flag { WGPEER_F_REMOVE_ME = 1U << 0, - WGPEER_F_REPLACE_ALLOWEDIPS = 1U << 1 + WGPEER_F_REPLACE_ALLOWEDIPS = 1U << 1, + __WGPEER_F_ALL = WGPEER_F_REMOVE_ME | WGPEER_F_REPLACE_ALLOWEDIPS }; enum wgpeer_attribute { WGPEER_A_UNSPEC, |