summaryrefslogtreecommitdiff
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-10-09 20:11:09 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-09 20:11:09 -0700
commitd93fa2ba64384a0bbee4ae7409d85fccb2cfcf14 (patch)
tree8e55d9d74f46ce13e4299d23c23c72b9306798c1 /net/ipv4/udp.c
parentd0e60206bea2dec46c0a28fd6b116646aa67c5ae (diff)
parent529a86e063e9ff625c4ff247d8aa17d8072444fb (diff)
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.c14
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,