]> git.hungrycats.org Git - linux/commit
xfrm: respect ip protocols rules criteria when performing dst lookups
authorEyal Birger <eyal.birger@gmail.com>
Tue, 3 Sep 2024 00:07:10 +0000 (17:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Nov 2024 00:56:03 +0000 (01:56 +0100)
commit681fa845cc3110e103324bc21b1f80b5b6b297d3
tree05be3469d5e22cfcff3aa1e043252110eb68d059
parent3094585b5f50e2ba33b6a44dd4e942c4bdb08208
xfrm: respect ip protocols rules criteria when performing dst lookups

[ Upstream commit b8469721034300bbb6dec5b4bf32492c95e16a0c ]

The series in the "fixes" tag added the ability to consider L4 attributes
in routing rules.

The dst lookup on the outer packet of encapsulated traffic in the xfrm
code was not adapted to this change, thus routing behavior that relies
on L4 information is not respected.

Pass the ip protocol information when performing dst lookups.

Fixes: a25724b05af0 ("Merge branch 'fib_rules-support-sport-dport-and-proto-match'")
Signed-off-by: Eyal Birger <eyal.birger@gmail.com>
Tested-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/xfrm.h
net/ipv4/xfrm4_policy.c
net/ipv6/xfrm6_policy.c
net/xfrm/xfrm_policy.c