Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: Remove IP_CT_NEW_REPLY definition.

Remove the definition of IP_CT_NEW_REPLY from the kernel as it does
not make sense. This allows the definition of IP_CT_NUMBER to be
simplified as well.

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

authored by

Jarno Rajahalme and committed by
Pablo Neira Ayuso
bfa3f9d7 d157bd76

+9 -5
+9 -3
include/uapi/linux/netfilter/nf_conntrack_common.h
··· 20 20 21 21 IP_CT_ESTABLISHED_REPLY = IP_CT_ESTABLISHED + IP_CT_IS_REPLY, 22 22 IP_CT_RELATED_REPLY = IP_CT_RELATED + IP_CT_IS_REPLY, 23 - IP_CT_NEW_REPLY = IP_CT_NEW + IP_CT_IS_REPLY, 24 - /* Number of distinct IP_CT types (no NEW in reply dirn). */ 25 - IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1 23 + /* No NEW in reply direction. */ 24 + 25 + /* Number of distinct IP_CT types. */ 26 + IP_CT_NUMBER, 27 + 28 + /* only for userspace compatibility */ 29 + #ifndef __KERNEL__ 30 + IP_CT_NEW_REPLY = IP_CT_NUMBER, 31 + #endif 26 32 }; 27 33 28 34 #define NF_CT_STATE_INVALID_BIT (1 << 0)
-2
net/openvswitch/conntrack.c
··· 75 75 switch (ctinfo) { 76 76 case IP_CT_ESTABLISHED_REPLY: 77 77 case IP_CT_RELATED_REPLY: 78 - case IP_CT_NEW_REPLY: 79 78 ct_state |= OVS_CS_F_REPLY_DIR; 80 79 break; 81 80 default: ··· 91 92 ct_state |= OVS_CS_F_RELATED; 92 93 break; 93 94 case IP_CT_NEW: 94 - case IP_CT_NEW_REPLY: 95 95 ct_state |= OVS_CS_F_NEW; 96 96 break; 97 97 default: