]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: provide correct dst in xfrm_neigh_lookup
authorJulian Anastasov <ja@ssi.bg>
Sat, 25 Feb 2017 15:57:43 +0000 (17:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Feb 2017 02:35:24 +0000 (21:35 -0500)
commitaed40eeb23a940008eb49375ffd6e8e6246803ff
tree07885bcb036945316b5f8add64dd202ae99c9f48
parent7041f04cbbee74720b0bb7315ea87ecb95b39fb2
xfrm: provide correct dst in xfrm_neigh_lookup

Fix xfrm_neigh_lookup to provide dst->path to the
neigh_lookup dst_ops method.

When skb is provided, the IP address in packet should already
match the dst->path address family. But for the non-skb case,
we should consider the last tunnel address as nexthop address.

Fixes: 9cc8bffae09b ("net: Add optional SKB arg to dst_ops->neigh_lookup().")
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_policy.c