mbox series

[net,v2,0/2] ipv4: Handle TOS and scope properly for ICMP redirects and PMTU updates

Message ID cover.1647519748.git.gnault@redhat.com (mailing list archive)
Headers show
Series ipv4: Handle TOS and scope properly for ICMP redirects and PMTU updates | expand

Message

Guillaume Nault March 17, 2022, 12:45 p.m. UTC
ICMPv4 PMTU and redirect handlers didn't properly initialise the
struct flowi4 they used for route lookups:

  * ECN bits sometimes weren't cleared from ->flowi4_tos.
  * The RTO_ONLINK flag wasn't taken into account for ->flowi4_scope.

In some special cases, this resulted in ICMP redirects and PMTU updates
not being taken into account because fib_lookup() couldn't retrieve the
correct route.

Changes since v1:
  * Fix 'Fixes' tag in patch 1 (David Ahern).
  * Add kernel seltest (David Ahern).

Guillaume Nault (2):
  ipv4: Fix route lookups when handling ICMP redirects and PMTU updates
  selftest: net: Test IPv4 PMTU exceptions with DSCP and ECN

 net/ipv4/route.c                    |  18 +++-
 tools/testing/selftests/net/pmtu.sh | 141 +++++++++++++++++++++++++++-
 2 files changed, 151 insertions(+), 8 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org March 18, 2022, 9:20 p.m. UTC | #1
Hello:

This series was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 17 Mar 2022 13:45:05 +0100 you wrote:
> ICMPv4 PMTU and redirect handlers didn't properly initialise the
> struct flowi4 they used for route lookups:
> 
>   * ECN bits sometimes weren't cleared from ->flowi4_tos.
>   * The RTO_ONLINK flag wasn't taken into account for ->flowi4_scope.
> 
> In some special cases, this resulted in ICMP redirects and PMTU updates
> not being taken into account because fib_lookup() couldn't retrieve the
> correct route.
> 
> [...]

Here is the summary with links:
  - [net,v2,1/2] ipv4: Fix route lookups when handling ICMP redirects and PMTU updates
    https://git.kernel.org/netdev/net/c/544b4dd568e3
  - [net,v2,2/2] selftest: net: Test IPv4 PMTU exceptions with DSCP and ECN
    https://git.kernel.org/netdev/net/c/ec730c3e1f0e

You are awesome, thank you!