aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/pkt_cls.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-01-11 20:36:11 -0800
committerJakub Kicinski <kuba@kernel.org>2022-01-11 20:36:11 -0800
commit29b3881b7977db792f93ebe440423811d5cfee56 (patch)
tree1feb789d12c940e8830d761159c9c7d5f625f603 /include/net/pkt_cls.h
parentnet: ethernet: sun4i-emac: replace magic number with macro (diff)
parentmlx5: Don't accidentally set RTO_ONLINK before mlx5e_route_lookup_ipv4_get() (diff)
downloadlinux-dev-29b3881b7977db792f93ebe440423811d5cfee56.tar.xz
linux-dev-29b3881b7977db792f93ebe440423811d5cfee56.zip
Merge branch 'ipv4-fix-accidental-rto_onlink-flags-passed-to-ip_route_output_key_hash'
Guillaume Nault says: ==================== ipv4: Fix accidental RTO_ONLINK flags passed to ip_route_output_key_hash() The IPv4 stack generally uses the last bit of ->flowi4_tos as a flag indicating link scope for route lookups (RTO_ONLINK). Therefore, we have to be careful when copying a TOS value to ->flowi4_tos. In particular, the ->tos field of IPv4 packets may have this bit set because of ECN. Also tunnel keys generally accept any user value for the tos. This series fixes several places where ->flowi4_tos was set from non-sanitised values and the flowi4 structure was later used by ip_route_output_key_hash(). Note that the IPv4 stack usually clears the RTO_ONLINK bit using RT_TOS(). However this macro is based on an obsolete interpretation of the old IPv4 TOS field (RFC 1349) and clears the three high order bits too. Since we don't need to clear these bits and since it doesn't make sense to clear only one of the ECN bits, this patch series uses INET_ECN_MASK instead. All patches were compile tested only. ==================== Link: https://lore.kernel.org/r/cover.1641821242.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/pkt_cls.h')
0 files changed, 0 insertions, 0 deletions