diff options
author | David S. Miller <davem@davemloft.net> | 2017-10-10 05:11:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-10 05:11:09 +0200 |
commit | d93fa2ba64384a0bbee4ae7409d85fccb2cfcf14 (patch) | |
tree | 8e55d9d74f46ce13e4299d23c23c72b9306798c1 /net/ipv4/udp.c | |
parent | ipv6: use rcu_dereference_bh() in ipv6_route_seq_next() (diff) | |
parent | Merge branch 'ppc-bundle' (bundle from Michael Ellerman) (diff) | |
download | linux-d93fa2ba64384a0bbee4ae7409d85fccb2cfcf14.tar.xz linux-d93fa2ba64384a0bbee4ae7409d85fccb2cfcf14.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index eb0359bdaa11..7c9a6e4a7253 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -2239,20 +2239,16 @@ int udp_v4_early_demux(struct sk_buff *skb) iph = ip_hdr(skb); uh = udp_hdr(skb); - if (skb->pkt_type == PACKET_BROADCAST || - skb->pkt_type == PACKET_MULTICAST) { + if (skb->pkt_type == PACKET_MULTICAST) { in_dev = __in_dev_get_rcu(skb->dev); if (!in_dev) return 0; - /* 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 0; - } + ours = ip_check_mc_rcu(in_dev, iph->daddr, iph->saddr, + iph->protocol); + if (!ours) + return 0; sk = __udp4_lib_mcast_demux_lookup(net, uh->dest, iph->daddr, uh->source, iph->saddr, |