History

netfilter: uapi: correct UNTRACKED conntrack state bit number

nft_ct exposes this bit to userspace. This used to be #define NF_CT_STATE_UNTRACKED_BIT (1 << (IP_CT_NUMBER + 1)) (IP_CT_NUMBER is 5, so this was 0x40) .. but this got changed to 8 (0x100) when the untracked object got removed. Replace this with a literal 6 to prevent further incompatible changes in case IP_CT_NUMBER ever increases.

Florian Westphal committed 8 years ago

Commit 4c82fd01 parent 24c0df81 file · +1 −1Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/netfilter/nf_conntrack_common.h+1−1
@@ -36,7 +36,7 @@ enum ip_conntrack_info { · 35 unmodified lines
3636
3737 #define NF_CT_STATE_INVALID_BIT (1 << 0)
3838 #define NF_CT_STATE_BIT(ctinfo) (1 << ((ctinfo) % IP_CT_IS_REPLY + 1))
39−#define NF_CT_STATE_UNTRACKED_BIT (1 << (IP_CT_UNTRACKED + 1))
39+#define NF_CT_STATE_UNTRACKED_BIT (1 << 6)
4040
4141 /* Bitset representing status of connection. */
4242 enum ip_conntrack_status {