]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: Honor original L3 slave device in xfrmi policy lookup
authorMartin Willi <martin@strongswan.org>
Tue, 26 Mar 2019 12:20:43 +0000 (13:20 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 27 Mar 2019 15:14:05 +0000 (16:14 +0100)
commitd1236a13f3140a5f5866db271bd3ea68d622919d
treeb8a060c8237b6b965b327946043a11e40eae07bc
parent90e25dfac13c2122f12fc173f6e87981cd57782a
xfrm: Honor original L3 slave device in xfrmi policy lookup

If an xfrmi is associated to a vrf layer 3 master device,
xfrm_policy_check() fails after traffic decapsulation. The input
interface is replaced by the layer 3 master device, and hence
xfrmi_decode_session() can't match the xfrmi anymore to satisfy
policy checking.

Extend ingress xfrmi lookup to honor the original layer 3 slave
device, allowing xfrm interfaces to operate within a vrf domain.

Fixes: 6b26f4d41932 ("xfrm: Add virtual xfrm interfaces")
Signed-off-by: Martin Willi <martin@strongswan.org>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/xfrm.h
net/xfrm/xfrm_interface.c
net/xfrm/xfrm_policy.c