diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/udp.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index f67f52b..2e3ebfe 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -604,7 +604,7 @@ static inline struct sock *__udp4_lib_lookup_skb(struct sk_buff *skb, { const struct iphdr *iph = ip_hdr(skb); - return __udp4_lib_lookup(dev_net(skb_dst(skb)->dev), iph->saddr, sport, + return __udp4_lib_lookup(dev_net(skb->dev), iph->saddr, sport, iph->daddr, dport, inet_iif(skb), udptable, skb); } @@ -612,13 +612,7 @@ static inline struct sock *__udp4_lib_lookup_skb(struct sk_buff *skb, struct sock *udp4_lib_lookup_skb(struct sk_buff *skb, __be16 sport, __be16 dport) { - const struct iphdr *iph = ip_hdr(skb); - const struct net_device *dev = - skb_dst(skb) ? skb_dst(skb)->dev : skb->dev; - - return __udp4_lib_lookup(dev_net(dev), iph->saddr, sport, - iph->daddr, dport, inet_iif(skb), - &udp_table, skb); + return __udp4_lib_lookup_skb(skb, sport, dport, &udp_table); } EXPORT_SYMBOL_GPL(udp4_lib_lookup_skb); |