Skip to content

Commit 87e94db

Browse files
regitummakynes
authored andcommitted
netfilter: synproxy: fix conntrackd interaction
This patch fixes the creation of connection tracking entry from netlink when synproxy is used. It was missing the addition of the synproxy extension. This was causing kernel crashes when a conntrack entry created by conntrackd was used after the switch of traffic from active node to the passive node. Signed-off-by: Eric Leblond <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 324318f commit 87e94db

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/netfilter/nf_conntrack_netlink.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
#include <net/netfilter/nf_conntrack_zones.h>
4646
#include <net/netfilter/nf_conntrack_timestamp.h>
4747
#include <net/netfilter/nf_conntrack_labels.h>
48+
#include <net/netfilter/nf_conntrack_seqadj.h>
49+
#include <net/netfilter/nf_conntrack_synproxy.h>
4850
#ifdef CONFIG_NF_NAT_NEEDED
4951
#include <net/netfilter/nf_nat_core.h>
5052
#include <net/netfilter/nf_nat_l4proto.h>
@@ -1827,6 +1829,8 @@ ctnetlink_create_conntrack(struct net *net,
18271829
nf_ct_tstamp_ext_add(ct, GFP_ATOMIC);
18281830
nf_ct_ecache_ext_add(ct, 0, 0, GFP_ATOMIC);
18291831
nf_ct_labels_ext_add(ct);
1832+
nfct_seqadj_ext_add(ct);
1833+
nfct_synproxy_ext_add(ct);
18301834

18311835
/* we must add conntrack extensions before confirmation. */
18321836
ct->status |= IPS_CONFIRMED;

0 commit comments

Comments
 (0)