net: ipv6: add second dif to raw socket lookups

Add a second device index, sdif, to raw socket lookups. sdif is the
index for ingress devices enslaved to an l3mdev. It allows the lookups
to consider the enslaved device as well as the L3 domain when searching
for a socket.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David Ahern
2017-08-07 08:44:22 -07:00
committed by David S. Miller
parent 4297a0ef08
commit 5108ab4bf4
3 changed files with 10 additions and 7 deletions

View File

@@ -52,7 +52,7 @@ static struct sock *raw_lookup(struct net *net, struct sock *from,
sk = __raw_v6_lookup(net, from, r->sdiag_raw_protocol,
(const struct in6_addr *)r->id.idiag_src,
(const struct in6_addr *)r->id.idiag_dst,
r->id.idiag_if);
r->id.idiag_if, 0);
#endif
return sk;
}