aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/inet_hashtables.h6
-rw-r--r--include/net/inet_sock.h7
-rw-r--r--net/ipv4/udp.c2
3 files changed, 8 insertions, 7 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index 8228b57eb18f..4427dcd1e53a 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -26,7 +26,6 @@
26 26
27#include <net/inet_connection_sock.h> 27#include <net/inet_connection_sock.h>
28#include <net/inet_sock.h> 28#include <net/inet_sock.h>
29#include <net/route.h>
30#include <net/sock.h> 29#include <net/sock.h>
31#include <net/tcp_states.h> 30#include <net/tcp_states.h>
32 31
@@ -266,11 +265,6 @@ out:
266 wake_up(&hashinfo->lhash_wait); 265 wake_up(&hashinfo->lhash_wait);
267} 266}
268 267
269static inline int inet_iif(const struct sk_buff *skb)
270{
271 return ((struct rtable *)skb->dst)->rt_iif;
272}
273
274extern struct sock *__inet_lookup_listener(struct inet_hashinfo *hashinfo, 268extern struct sock *__inet_lookup_listener(struct inet_hashinfo *hashinfo,
275 const __be32 daddr, 269 const __be32 daddr,
276 const unsigned short hnum, 270 const unsigned short hnum,
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index 62daf214931f..70013c5f4e59 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -24,6 +24,7 @@
24#include <net/flow.h> 24#include <net/flow.h>
25#include <net/sock.h> 25#include <net/sock.h>
26#include <net/request_sock.h> 26#include <net/request_sock.h>
27#include <net/route.h>
27 28
28/** struct ip_options - IP Options 29/** struct ip_options - IP Options
29 * 30 *
@@ -190,4 +191,10 @@ static inline int inet_sk_ehashfn(const struct sock *sk)
190 return inet_ehashfn(laddr, lport, faddr, fport); 191 return inet_ehashfn(laddr, lport, faddr, fport);
191} 192}
192 193
194
195static inline int inet_iif(const struct sk_buff *skb)
196{
197 return ((struct rtable *)skb->dst)->rt_iif;
198}
199
193#endif /* _INET_SOCK_H */ 200#endif /* _INET_SOCK_H */
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 35d2b0e9e10b..4bc25b46f33f 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1152,7 +1152,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct hlist_head udptable[],
1152 return __udp4_lib_mcast_deliver(skb, uh, saddr, daddr, udptable); 1152 return __udp4_lib_mcast_deliver(skb, uh, saddr, daddr, udptable);
1153 1153
1154 sk = __udp4_lib_lookup(saddr, uh->source, daddr, uh->dest, 1154 sk = __udp4_lib_lookup(saddr, uh->source, daddr, uh->dest,
1155 skb->dev->ifindex, udptable ); 1155 inet_iif(skb), udptable);
1156 1156
1157 if (sk != NULL) { 1157 if (sk != NULL) {
1158 int ret = udp_queue_rcv_skb(sk, skb); 1158 int ret = udp_queue_rcv_skb(sk, skb);