Skip to content
Commit 3a591318 authored by Eyal Birger's avatar Eyal Birger Committed by Steffen Klassert
Browse files

xfrm: fix "disable_policy" on ipv4 early demux



The commit in the "Fixes" tag tried to avoid a case where policy check
is ignored due to dst caching in next hops.

However, when the traffic is locally consumed, the dst may be cached
in a local TCP or UDP socket as part of early demux. In this case the
"disable_policy" flag is not checked as ip_route_input_noref() was only
called before caching, and thus, packets after the initial packet in a
flow will be dropped if not matching policies.

Fix by checking the "disable_policy" flag also when a valid dst is
already available.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216557
Reported-by: default avatarMonil Patel <monil191989@gmail.com>
Fixes: e6175a2e

 ("xfrm: fix "disable_policy" flag use when arriving from different devices")
Signed-off-by: default avatarEyal Birger <eyal.birger@gmail.com>

----

v2: use dev instead of skb->dev
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent 1d22f78d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment