Loading include/linux/skbuff.h +1 −0 Original line number Diff line number Diff line Loading @@ -597,6 +597,7 @@ struct sk_buff { #endif __u8 ipvs_property:1; __u8 inner_protocol_type:1; __u8 fast_forwarded:1; /* 4 or 6 bit hole */ #ifdef CONFIG_NET_SCHED Loading include/net/netfilter/nf_conntrack.h +2 −0 Original line number Diff line number Diff line Loading @@ -136,6 +136,8 @@ struct nf_conn { bool sip_original_dir; bool sip_reply_dir; void *sfe_entry; /* Storage reserved for other modules, must be the last member */ union nf_conntrack_proto proto; }; Loading net/core/dev.c +12 −0 Original line number Diff line number Diff line Loading @@ -3618,6 +3618,9 @@ static bool skb_pfmemalloc_protocol(struct sk_buff *skb) } } int (*athrs_fast_nat_recv)(struct sk_buff *skb) __rcu __read_mostly; EXPORT_SYMBOL(athrs_fast_nat_recv); static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc) { struct packet_type *ptype, *pt_prev; Loading @@ -3627,6 +3630,7 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc) bool deliver_exact = false; int ret = NET_RX_DROP; __be16 type; int (*fast_recv)(struct sk_buff *skb); net_timestamp_check(!netdev_tstamp_prequeue, skb); Loading Loading @@ -3674,6 +3678,14 @@ another_round: } skip_taps: fast_recv = rcu_dereference(athrs_fast_nat_recv); if (fast_recv) { if (fast_recv(skb)) { ret = NET_RX_SUCCESS; goto unlock; } } #ifdef CONFIG_NET_CLS_ACT skb = handle_ing(skb, &pt_prev, &ret, orig_dev); if (!skb) Loading net/netfilter/nf_conntrack_core.c +14 −0 Original line number Diff line number Diff line Loading @@ -287,6 +287,9 @@ static void nf_ct_del_from_dying_or_unconfirmed_list(struct nf_conn *ct) spin_unlock(&pcpu->lock); } void (*delete_sfe_entry)(struct nf_conn *ct) __rcu __read_mostly; EXPORT_SYMBOL(delete_sfe_entry); static void destroy_conntrack(struct nf_conntrack *nfct) { Loading @@ -296,11 +299,22 @@ destroy_conntrack(struct nf_conntrack *nfct) struct sip_list *sip_node = NULL; struct list_head *sip_node_list; struct list_head *sip_node_save_list; void (*delete_entry)(struct nf_conn *ct); pr_debug("destroy_conntrack(%p)\n", ct); NF_CT_ASSERT(atomic_read(&nfct->use) == 0); NF_CT_ASSERT(!timer_pending(&ct->timeout)); if (ct->sfe_entry != NULL) { delete_entry = rcu_dereference(delete_sfe_entry); if (delete_entry) delete_entry(ct); } /* To make sure we don't get any weird locking issues here: * destroy_conntrack() MUST NOT be called with a write lock * to nf_conntrack_lock!!! -HW */ rcu_read_lock(); l4proto = __nf_ct_l4proto_find(nf_ct_l3num(ct), nf_ct_protonum(ct)); if (l4proto && l4proto->destroy) Loading net/netfilter/nf_conntrack_proto_tcp.c +4 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,10 @@ #include <net/netfilter/ipv4/nf_conntrack_ipv4.h> #include <net/netfilter/ipv6/nf_conntrack_ipv6.h> /* Do not check the TCP window for incoming packets */ int nf_ct_tcp_no_window_check __read_mostly = 1; EXPORT_SYMBOL(nf_ct_tcp_no_window_check); /* "Be conservative in what you do, be liberal in what you accept from others." If it's non-zero, we mark only out of window RST segments as INVALID. */ Loading Loading
include/linux/skbuff.h +1 −0 Original line number Diff line number Diff line Loading @@ -597,6 +597,7 @@ struct sk_buff { #endif __u8 ipvs_property:1; __u8 inner_protocol_type:1; __u8 fast_forwarded:1; /* 4 or 6 bit hole */ #ifdef CONFIG_NET_SCHED Loading
include/net/netfilter/nf_conntrack.h +2 −0 Original line number Diff line number Diff line Loading @@ -136,6 +136,8 @@ struct nf_conn { bool sip_original_dir; bool sip_reply_dir; void *sfe_entry; /* Storage reserved for other modules, must be the last member */ union nf_conntrack_proto proto; }; Loading
net/core/dev.c +12 −0 Original line number Diff line number Diff line Loading @@ -3618,6 +3618,9 @@ static bool skb_pfmemalloc_protocol(struct sk_buff *skb) } } int (*athrs_fast_nat_recv)(struct sk_buff *skb) __rcu __read_mostly; EXPORT_SYMBOL(athrs_fast_nat_recv); static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc) { struct packet_type *ptype, *pt_prev; Loading @@ -3627,6 +3630,7 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc) bool deliver_exact = false; int ret = NET_RX_DROP; __be16 type; int (*fast_recv)(struct sk_buff *skb); net_timestamp_check(!netdev_tstamp_prequeue, skb); Loading Loading @@ -3674,6 +3678,14 @@ another_round: } skip_taps: fast_recv = rcu_dereference(athrs_fast_nat_recv); if (fast_recv) { if (fast_recv(skb)) { ret = NET_RX_SUCCESS; goto unlock; } } #ifdef CONFIG_NET_CLS_ACT skb = handle_ing(skb, &pt_prev, &ret, orig_dev); if (!skb) Loading
net/netfilter/nf_conntrack_core.c +14 −0 Original line number Diff line number Diff line Loading @@ -287,6 +287,9 @@ static void nf_ct_del_from_dying_or_unconfirmed_list(struct nf_conn *ct) spin_unlock(&pcpu->lock); } void (*delete_sfe_entry)(struct nf_conn *ct) __rcu __read_mostly; EXPORT_SYMBOL(delete_sfe_entry); static void destroy_conntrack(struct nf_conntrack *nfct) { Loading @@ -296,11 +299,22 @@ destroy_conntrack(struct nf_conntrack *nfct) struct sip_list *sip_node = NULL; struct list_head *sip_node_list; struct list_head *sip_node_save_list; void (*delete_entry)(struct nf_conn *ct); pr_debug("destroy_conntrack(%p)\n", ct); NF_CT_ASSERT(atomic_read(&nfct->use) == 0); NF_CT_ASSERT(!timer_pending(&ct->timeout)); if (ct->sfe_entry != NULL) { delete_entry = rcu_dereference(delete_sfe_entry); if (delete_entry) delete_entry(ct); } /* To make sure we don't get any weird locking issues here: * destroy_conntrack() MUST NOT be called with a write lock * to nf_conntrack_lock!!! -HW */ rcu_read_lock(); l4proto = __nf_ct_l4proto_find(nf_ct_l3num(ct), nf_ct_protonum(ct)); if (l4proto && l4proto->destroy) Loading
net/netfilter/nf_conntrack_proto_tcp.c +4 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,10 @@ #include <net/netfilter/ipv4/nf_conntrack_ipv4.h> #include <net/netfilter/ipv6/nf_conntrack_ipv6.h> /* Do not check the TCP window for incoming packets */ int nf_ct_tcp_no_window_check __read_mostly = 1; EXPORT_SYMBOL(nf_ct_tcp_no_window_check); /* "Be conservative in what you do, be liberal in what you accept from others." If it's non-zero, we mark only out of window RST segments as INVALID. */ Loading