Skip to content

Commit 1982a2a

Browse files
Guillaume Naultklassert
authored andcommitted
xfrm: Clear low order bits of ->flowi4_tos in decode_session4().
Commit 23e7b1b ("xfrm: Don't accidentally set RTO_ONLINK in decode_session4()") fixed a problem where decode_session4() could erroneously set the RTO_ONLINK flag for IPv4 route lookups. This problem was reintroduced when decode_session4() was modified to use the flow dissector. Fix this by clearing again the two low order bits of ->flowi4_tos. Found by code inspection, compile tested only. Fixes: 7a02070 ("xfrm: policy: replace session decode with flow dissector") Signed-off-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
1 parent e327b23 commit 1982a2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/xfrm/xfrm_policy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3416,7 +3416,7 @@ decode_session4(const struct xfrm_flow_keys *flkeys, struct flowi *fl, bool reve
34163416
}
34173417

34183418
fl4->flowi4_proto = flkeys->basic.ip_proto;
3419-
fl4->flowi4_tos = flkeys->ip.tos;
3419+
fl4->flowi4_tos = flkeys->ip.tos & ~INET_ECN_MASK;
34203420
}
34213421

34223422
#if IS_ENABLED(CONFIG_IPV6)

0 commit comments

Comments
 (0)