[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>
This commit is contained in:

committed by
David S. Miller

parent
41fb285430
commit
fee9dee730
@@ -26,7 +26,6 @@
|
||||
|
||||
#include <net/inet_connection_sock.h>
|
||||
#include <net/inet_sock.h>
|
||||
#include <net/route.h>
|
||||
#include <net/sock.h>
|
||||
#include <net/tcp_states.h>
|
||||
|
||||
@@ -266,11 +265,6 @@ out:
|
||||
wake_up(&hashinfo->lhash_wait);
|
||||
}
|
||||
|
||||
static inline int inet_iif(const struct sk_buff *skb)
|
||||
{
|
||||
return ((struct rtable *)skb->dst)->rt_iif;
|
||||
}
|
||||
|
||||
extern struct sock *__inet_lookup_listener(struct inet_hashinfo *hashinfo,
|
||||
const __be32 daddr,
|
||||
const unsigned short hnum,
|
||||
|
Reference in New Issue
Block a user