aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 4560b291180b..f3e00c5cd1ed 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1536,6 +1536,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
1536 1536
1537 uh = udp_hdr(skb); 1537 uh = udp_hdr(skb);
1538 ulen = ntohs(uh->len); 1538 ulen = ntohs(uh->len);
1539 saddr = ip_hdr(skb)->saddr;
1540 daddr = ip_hdr(skb)->daddr;
1541
1539 if (ulen > skb->len) 1542 if (ulen > skb->len)
1540 goto short_packet; 1543 goto short_packet;
1541 1544
@@ -1549,9 +1552,6 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
1549 if (udp4_csum_init(skb, uh, proto)) 1552 if (udp4_csum_init(skb, uh, proto))
1550 goto csum_error; 1553 goto csum_error;
1551 1554
1552 saddr = ip_hdr(skb)->saddr;
1553 daddr = ip_hdr(skb)->daddr;
1554
1555 if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST)) 1555 if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST))
1556 return __udp4_lib_mcast_deliver(net, skb, uh, 1556 return __udp4_lib_mcast_deliver(net, skb, uh,
1557 saddr, daddr, udptable); 1557 saddr, daddr, udptable);