aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index a7af9d68cd6c..52b8347ae3b2 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -680,12 +680,11 @@ static inline int udp6_csum_init(struct sk_buff *skb, struct udphdr *uh,
680int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, 680int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
681 int proto) 681 int proto)
682{ 682{
683 struct net *net = dev_net(skb->dev);
683 struct sock *sk; 684 struct sock *sk;
684 struct udphdr *uh; 685 struct udphdr *uh;
685 struct net_device *dev = skb->dev;
686 struct in6_addr *saddr, *daddr; 686 struct in6_addr *saddr, *daddr;
687 u32 ulen = 0; 687 u32 ulen = 0;
688 struct net *net = dev_net(skb->dev);
689 688
690 if (!pskb_may_pull(skb, sizeof(struct udphdr))) 689 if (!pskb_may_pull(skb, sizeof(struct udphdr)))
691 goto short_packet; 690 goto short_packet;
@@ -744,7 +743,7 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
744 UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS, 743 UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS,
745 proto == IPPROTO_UDPLITE); 744 proto == IPPROTO_UDPLITE);
746 745
747 icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, dev); 746 icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0);
748 747
749 kfree_skb(skb); 748 kfree_skb(skb);
750 return 0; 749 return 0;