Skip to content
This repository was archived by the owner on Sep 24, 2020. It is now read-only.

Commit 36a28b2

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains four Netfilter fixes for net, they are: 1) Fix Kconfig dependencies of new nf_dup_ipv4 and nf_dup_ipv6. 2) Remove bogus test nh_scope in IPv4 rpfilter match that is breaking --accept-local, from Xin Long. 3) Wait for RCU grace period after dropping the pending packets in the nfqueue, from Florian Westphal. 4) Fix sleeping allocation while holding spin_lock_bh, from Nikolay Borisov. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents e535679 + 00db674 commit 36a28b2

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

net/ipv4/netfilter/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ endif # NF_TABLES
7575

7676
config NF_DUP_IPV4
7777
tristate "Netfilter IPv4 packet duplication to alternate destination"
78+
depends on !NF_CONNTRACK || NF_CONNTRACK
7879
help
7980
This option enables the nf_dup_ipv4 core, which duplicates an IPv4
8081
packet to be rerouted to another destination.

net/ipv4/netfilter/ipt_rpfilter.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ static bool rpfilter_lookup_reverse(struct flowi4 *fl4,
6161
if (FIB_RES_DEV(res) == dev)
6262
dev_match = true;
6363
#endif
64-
if (dev_match || flags & XT_RPFILTER_LOOSE)
65-
return FIB_RES_NH(res).nh_scope <= RT_SCOPE_HOST;
66-
return dev_match;
64+
return dev_match || flags & XT_RPFILTER_LOOSE;
6765
}
6866

6967
static bool rpfilter_is_local(const struct sk_buff *skb)

net/ipv6/netfilter/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ endif # NF_TABLES
5858

5959
config NF_DUP_IPV6
6060
tristate "Netfilter IPv6 packet duplication to alternate destination"
61+
depends on !NF_CONNTRACK || NF_CONNTRACK
6162
help
6263
This option enables the nf_dup_ipv6 core, which duplicates an IPv6
6364
packet to be rerouted to another destination.

net/netfilter/core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ void nf_unregister_net_hook(struct net *net, const struct nf_hook_ops *reg)
152152
#endif
153153
synchronize_net();
154154
nf_queue_nf_hook_drop(net, &entry->ops);
155+
/* other cpu might still process nfqueue verdict that used reg */
156+
synchronize_net();
155157
kfree(entry);
156158
}
157159
EXPORT_SYMBOL(nf_unregister_net_hook);

net/netfilter/ipset/ip_set_list_set.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ list_set_uadd(struct ip_set *set, void *value, const struct ip_set_ext *ext,
297297
ip_set_timeout_expired(ext_timeout(n, set))))
298298
n = NULL;
299299

300-
e = kzalloc(set->dsize, GFP_KERNEL);
300+
e = kzalloc(set->dsize, GFP_ATOMIC);
301301
if (!e)
302302
return -ENOMEM;
303303
e->id = d->id;

0 commit comments

Comments
 (0)