aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2007-10-25 21:54:46 -0400
committerDavid S. Miller <davem@davemloft.net>2007-10-25 21:54:46 -0400
commitfee9dee730a40f671c1972a324ed54f0d68523e1 (patch)
tree4a688264696a3cfdf7312e92b52ac4794197a7a5 /net/ipv4/udp.c
parent41fb285430e9cb57da624d838afef7b2fc67e276 (diff)
[UDP]: Make use of inet_iif() when doing socket lookups.
UDP currently uses skb->dev->ifindex which may provide the wrong information when the socket bound to a specific interface. This patch makes inet_iif() accessible to UDP and makes UDP use it. The scenario we are trying to fix is when a client is running on the same system and the server and both client and server bind to a non-loopback device. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Acked-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c2
1 files changed, 1 insertions, 1 deletions
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);