Repository navigation
Commit 7f2ca96
xfrm: Don't accidentally set RTO_ONLINK in decode_session4()
commit 23e7b1b upstream.
Similar to commit 94e2238 ("xfrm4: strip ECN bits from tos field"),
clear the ECN bits from iph->tos when setting ->flowi4_tos.
This ensures that the last bit of ->flowi4_tos is cleared, so
ip_route_output_key_hash() isn't going to restrict the scope of the
route lookup.
Use ~INET_ECN_MASK instead of IPTOS_RT_MASK, because we have no reason
to clear the high order bits.
Found by code inspection, compile tested only.
Fixes: 4da3089 ("[IPSEC]: Use TOS when doing tunnel lookups")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 2b1415c commit 7f2ca96
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
3294 | 3295 | | |
3295 | 3296 | | |
3296 | 3297 | | |
3297 | | - | |
| 3298 | + | |
3298 | 3299 | | |
3299 | 3300 | | |
3300 | 3301 | | |
| |||
0 commit comments