diff options
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 8fef859db35d..c36522a0f113 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1527,6 +1527,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, | |||
1527 | 1527 | ||
1528 | uh = udp_hdr(skb); | 1528 | uh = udp_hdr(skb); |
1529 | ulen = ntohs(uh->len); | 1529 | ulen = ntohs(uh->len); |
1530 | saddr = ip_hdr(skb)->saddr; | ||
1531 | daddr = ip_hdr(skb)->daddr; | ||
1532 | |||
1530 | if (ulen > skb->len) | 1533 | if (ulen > skb->len) |
1531 | goto short_packet; | 1534 | goto short_packet; |
1532 | 1535 | ||
@@ -1540,9 +1543,6 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, | |||
1540 | if (udp4_csum_init(skb, uh, proto)) | 1543 | if (udp4_csum_init(skb, uh, proto)) |
1541 | goto csum_error; | 1544 | goto csum_error; |
1542 | 1545 | ||
1543 | saddr = ip_hdr(skb)->saddr; | ||
1544 | daddr = ip_hdr(skb)->daddr; | ||
1545 | |||
1546 | if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST)) | 1546 | if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST)) |
1547 | return __udp4_lib_mcast_deliver(net, skb, uh, | 1547 | return __udp4_lib_mcast_deliver(net, skb, uh, |
1548 | saddr, daddr, udptable); | 1548 | saddr, daddr, udptable); |