diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2015-08-31 15:58:46 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-31 12:34:00 -0700 |
commit | b8d3e4163a3562d7cba486687904383e78e7dd6a (patch) | |
tree | 89ae9d8715c49d32593acad50712c4a6050d8969 /include/uapi/linux | |
parent | 1bb14807bc761a88bb9d319e7bf519eebf4c82ec (diff) | |
download | linux-stable-b8d3e4163a3562d7cba486687904383e78e7dd6a.tar.gz linux-stable-b8d3e4163a3562d7cba486687904383e78e7dd6a.tar.bz2 linux-stable-b8d3e4163a3562d7cba486687904383e78e7dd6a.zip |
fib, fib6: reject invalid feature bits
Feature bits that are invalid should not be accepted by the kernel,
only the lower 4 bits may be configured, but not the remaining ones.
Even from these 4, 2 of them are unused.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r-- | include/uapi/linux/rtnetlink.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index 0d3d3cc43356..702024769c74 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h @@ -418,10 +418,13 @@ enum { #define RTAX_MAX (__RTAX_MAX - 1) -#define RTAX_FEATURE_ECN 0x00000001 -#define RTAX_FEATURE_SACK 0x00000002 -#define RTAX_FEATURE_TIMESTAMP 0x00000004 -#define RTAX_FEATURE_ALLFRAG 0x00000008 +#define RTAX_FEATURE_ECN (1 << 0) +#define RTAX_FEATURE_SACK (1 << 1) +#define RTAX_FEATURE_TIMESTAMP (1 << 2) +#define RTAX_FEATURE_ALLFRAG (1 << 3) + +#define RTAX_FEATURE_MASK (RTAX_FEATURE_ECN | RTAX_FEATURE_SACK | \ + RTAX_FEATURE_TIMESTAMP | RTAX_FEATURE_ALLFRAG) struct rta_session { __u8 proto; |