Loading include/net/netfilter/nf_conntrack_expect.h +4 −1 Original line number Diff line number Diff line Loading @@ -99,9 +99,12 @@ void nf_ct_expect_init(struct nf_conntrack_expect *, unsigned int, u_int8_t, const union nf_inet_addr *, u_int8_t, const __be16 *, const __be16 *); void nf_ct_expect_put(struct nf_conntrack_expect *exp); int nf_ct_expect_related(struct nf_conntrack_expect *expect); int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, u32 pid, int report); static inline int nf_ct_expect_related(struct nf_conntrack_expect *expect) { return nf_ct_expect_related_report(expect, 0, 0); } #endif /*_NF_CONNTRACK_EXPECT_H*/ net/ipv6/netfilter/ip6_tables.c +2 −0 Original line number Diff line number Diff line Loading @@ -1033,6 +1033,8 @@ static struct xt_counters *alloc_counters(struct xt_table *table) xt_free_table_info(info); return counters; free_counters: vfree(counters); nomem: Loading net/netfilter/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -374,7 +374,7 @@ config NETFILTER_XT_TARGET_HL config NETFILTER_XT_TARGET_LED tristate '"LED" target support' depends on LEDS_CLASS && LED_TRIGGERS depends on LEDS_CLASS && LEDS_TRIGGERS depends on NETFILTER_ADVANCED help This option adds a `LED' target, which allows you to blink LEDs in Loading net/netfilter/nf_conntrack_expect.c +6 −24 Original line number Diff line number Diff line Loading @@ -372,7 +372,7 @@ static inline int __nf_ct_expect_check(struct nf_conntrack_expect *expect) struct net *net = nf_ct_exp_net(expect); struct hlist_node *n; unsigned int h; int ret = 0; int ret = 1; if (!master_help->helper) { ret = -ESHUTDOWN; Loading Loading @@ -412,43 +412,25 @@ out: return ret; } int nf_ct_expect_related(struct nf_conntrack_expect *expect) int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, u32 pid, int report) { int ret; spin_lock_bh(&nf_conntrack_lock); ret = __nf_ct_expect_check(expect); if (ret < 0) if (ret <= 0) goto out; ret = 0; nf_ct_expect_insert(expect); atomic_inc(&expect->use); spin_unlock_bh(&nf_conntrack_lock); nf_ct_expect_event(IPEXP_NEW, expect); nf_ct_expect_put(expect); nf_ct_expect_event_report(IPEXP_NEW, expect, pid, report); return ret; out: spin_unlock_bh(&nf_conntrack_lock); return ret; } EXPORT_SYMBOL_GPL(nf_ct_expect_related); int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, u32 pid, int report) { int ret; spin_lock_bh(&nf_conntrack_lock); ret = __nf_ct_expect_check(expect); if (ret < 0) goto out; nf_ct_expect_insert(expect); out: spin_unlock_bh(&nf_conntrack_lock); if (ret == 0) nf_ct_expect_event_report(IPEXP_NEW, expect, pid, report); return ret; } EXPORT_SYMBOL_GPL(nf_ct_expect_related_report); #ifdef CONFIG_PROC_FS Loading Loading
include/net/netfilter/nf_conntrack_expect.h +4 −1 Original line number Diff line number Diff line Loading @@ -99,9 +99,12 @@ void nf_ct_expect_init(struct nf_conntrack_expect *, unsigned int, u_int8_t, const union nf_inet_addr *, u_int8_t, const __be16 *, const __be16 *); void nf_ct_expect_put(struct nf_conntrack_expect *exp); int nf_ct_expect_related(struct nf_conntrack_expect *expect); int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, u32 pid, int report); static inline int nf_ct_expect_related(struct nf_conntrack_expect *expect) { return nf_ct_expect_related_report(expect, 0, 0); } #endif /*_NF_CONNTRACK_EXPECT_H*/
net/ipv6/netfilter/ip6_tables.c +2 −0 Original line number Diff line number Diff line Loading @@ -1033,6 +1033,8 @@ static struct xt_counters *alloc_counters(struct xt_table *table) xt_free_table_info(info); return counters; free_counters: vfree(counters); nomem: Loading
net/netfilter/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -374,7 +374,7 @@ config NETFILTER_XT_TARGET_HL config NETFILTER_XT_TARGET_LED tristate '"LED" target support' depends on LEDS_CLASS && LED_TRIGGERS depends on LEDS_CLASS && LEDS_TRIGGERS depends on NETFILTER_ADVANCED help This option adds a `LED' target, which allows you to blink LEDs in Loading
net/netfilter/nf_conntrack_expect.c +6 −24 Original line number Diff line number Diff line Loading @@ -372,7 +372,7 @@ static inline int __nf_ct_expect_check(struct nf_conntrack_expect *expect) struct net *net = nf_ct_exp_net(expect); struct hlist_node *n; unsigned int h; int ret = 0; int ret = 1; if (!master_help->helper) { ret = -ESHUTDOWN; Loading Loading @@ -412,43 +412,25 @@ out: return ret; } int nf_ct_expect_related(struct nf_conntrack_expect *expect) int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, u32 pid, int report) { int ret; spin_lock_bh(&nf_conntrack_lock); ret = __nf_ct_expect_check(expect); if (ret < 0) if (ret <= 0) goto out; ret = 0; nf_ct_expect_insert(expect); atomic_inc(&expect->use); spin_unlock_bh(&nf_conntrack_lock); nf_ct_expect_event(IPEXP_NEW, expect); nf_ct_expect_put(expect); nf_ct_expect_event_report(IPEXP_NEW, expect, pid, report); return ret; out: spin_unlock_bh(&nf_conntrack_lock); return ret; } EXPORT_SYMBOL_GPL(nf_ct_expect_related); int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, u32 pid, int report) { int ret; spin_lock_bh(&nf_conntrack_lock); ret = __nf_ct_expect_check(expect); if (ret < 0) goto out; nf_ct_expect_insert(expect); out: spin_unlock_bh(&nf_conntrack_lock); if (ret == 0) nf_ct_expect_event_report(IPEXP_NEW, expect, pid, report); return ret; } EXPORT_SYMBOL_GPL(nf_ct_expect_related_report); #ifdef CONFIG_PROC_FS Loading