mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
ipv4: fix broadcast packets reception
[ Upstream commitad0ea1989c] Currently, ingress ipv4 broadcast datagrams are dropped since, in udp_v4_early_demux(), ip_check_mc_rcu() is invoked even on bcast packets. This patch addresses the issue, invoking ip_check_mc_rcu() only for mcast packets. Fixes:6e54030932("ipv4/udp: Verify multicast group is ours in upd_v4_early_demux()") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8178211eb7
commit
2ddb181390
|
|
@ -1990,10 +1990,14 @@ void udp_v4_early_demux(struct sk_buff *skb)
|
|||
if (!in_dev)
|
||||
return;
|
||||
|
||||
ours = ip_check_mc_rcu(in_dev, iph->daddr, iph->saddr,
|
||||
iph->protocol);
|
||||
if (!ours)
|
||||
return;
|
||||
/* we are supposed to accept bcast packets */
|
||||
if (skb->pkt_type == PACKET_MULTICAST) {
|
||||
ours = ip_check_mc_rcu(in_dev, iph->daddr, iph->saddr,
|
||||
iph->protocol);
|
||||
if (!ours)
|
||||
return;
|
||||
}
|
||||
|
||||
sk = __udp4_lib_mcast_demux_lookup(net, uh->dest, iph->daddr,
|
||||
uh->source, iph->saddr, dif);
|
||||
} else if (skb->pkt_type == PACKET_HOST) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user