]> Gentwo Git Trees - linux/.git/commit
selftests: traceroute: Test traceroute with different source IPs
authorIdo Schimmel <idosch@nvidia.com>
Mon, 8 Sep 2025 07:32:37 +0000 (10:32 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 11 Sep 2025 10:22:38 +0000 (12:22 +0200)
commit2e6428100b1613d85d5442c14ee18c5a47054daf
tree6ab8bf4345762f697f0c9b06ccb99aa251d85144
parent5c9c78224fc3045c8ffe1a4c7d25d277e2e02b7b
selftests: traceroute: Test traceroute with different source IPs

When generating ICMP error messages, the kernel will prefer a source IP
that is on the same subnet as the destination IP (see
inet_select_addr()). Test this behavior by invoking traceroute with
different source IPs and checking that the ICMP error message is
generated with a source IP in the same subnet.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20250908073238.119240-8-idosch@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/traceroute.sh