Thank you for your contribution! Sashiko AI review found 5 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 4
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] test_dr_v6_pmtu() in
tools/testing/selftests/net/netfilter/ipvs.sh can pass on a kernel…
- [Low] The new top-level `checktool "python3 -c pass" "run test without
python3"` in tools/testing/selftests/net/netfilter/ipvs.sh runs before…
- [Low] The commit message carries the trailer 'Co-Authored-By: Claude
Sonnet 5.5 <nore…@anthropic.com>'.
- [Low] The header comment of udp_send_v6() in
tools/testing/selftests/net/netfilter/ipvs.sh says it sends 'one UDP…
- [Low] test_dr_v6_pmtu() in
tools/testing/selftests/net/netfilter/ipvs.sh never checks the exit…
--
selftests: net: ipvs: check a PMTU learned after the DR route was cached
This adds an IPv6 DR mode test to ipvs.sh. The test caches the director's
route to the real server, forges a packet too big message so the director
learns a PMTU for the real server, and then checks that an oversized
datagram gets a packet too big message back to the client. It also adds
CONFIG_IP_VS_IPV6 and CONFIG_IP_VS_PROTO_UDP to the netfilter selftest
config.
> Co-Authored-By: Claude Sonnet 5.5 <nore…@anthropic.com>
[Severity: Low]
This isn't a bug, but Co-Authored-By is not in $signature_tags in
scripts/checkpatch.pl. Running checkpatch on this patch will warn
"Non-standard signature: Co-Authored-By:".
Documentation/process/coding-assistants.rst in this tree does not define an
AI attribution trailer. It also forbids an AI Signed-off-by, so
Co-developed-by can't be used either.
Could the attribution follow a convention the maintainers accept, or move
below the --- line?
> diff --git a/tools/testing/selftests/net/netfilter/ipvs.sh b/tools/testing/selftests/net/netfilter/ipvs.sh
> index 9c9d5b38ab712..556ce071035ec 100755
> --- a/tools/testing/selftests/net/netfilter/ipvs.sh
> +++ b/tools/testing/selftests/net/netfilter/ipvs.sh
[ ... ]
> @@ -54,6 +60,7 @@ fi
>
> checktool "ipvsadm -v" "run test without ipvsadm"
> checktool "socat -h" "run test without socat"
> +checktool "python3 -c pass" "run test without python3"
[Severity: Low]
On a system without python3, does this skip the existing IPv4 DR, NAT and
tunnel tests as well? checktool() in netfilter/lib.sh exits the whole
script:
checktool (){
if ! $1 > /dev/null 2>&1; then
echo "SKIP: Could not $2"
exit $ksft_skip
fi
}
The IPv4 tests only need socat, and before this patch they ran without
python3. Only test_dr_v6_pmtu() uses python3, through udp_send_v6() and
send_ptb_v6().
Could the python3 check move into test_dr_v6_pmtu() so that only that test
is skipped?
[ ... ]
> @@ -169,6 +176,74 @@ test_tun() {
> test_service
> }
>
> +# Send one UDP datagram of ${2} bytes from the client to the IPv6 service and
> +# keep the socket open for a moment, so that a packet too big message for it
> +# is accepted.
> +udp_send_v6() {
> + ip netns exec "${ns0}" python3 -c '
> +import socket, sys, time
> +s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
> +s.bind((sys.argv[1], 0))
> +s.sendto(b"x" * int(sys.argv[3]), (sys.argv[2], int(sys.argv[4])))
> +time.sleep(0.5)
> +' "${cip_v6}" "${vip_v6}" "${1}" "${port}"
> +}
[Severity: Low]
This isn't a bug, but the comment says the datagram is ${2} bytes. The size
actually comes from ${1}, which is passed as sys.argv[3]. Should the comment
say ${1}?
[ ... ]
> +test_dr_v6_pmtu() {
[ ... ]
> + ip netns exec "${ns1}" ip addr add "${vip_v6}/128" dev lo nodad
> + ip netns exec "${ns1}" ipvsadm -A -u "[${vip_v6}]:${port}" -s rr
> + ip netns exec "${ns1}" ipvsadm -a -u "[${vip_v6}]:${port}" \
> + -r "[${rip_v6}]:${port}" -g
[Severity: Low]
What happens here if ip_vs was built without CONFIG_IP_VS_IPV6? Neither
ipvsadm call has its exit status checked, so the test carries on with no
service.
The datagrams to vip_v6 would then be delivered locally in ns1. Nothing
listens on the port there, and they are never forwarded to the real server.
The first check still passes. ns1 learns the PMTU from the forged packet
too big through icmpv6_err()->ip6_update_pmtu(), without IPVS being
involved.
The second check then reports "FAIL: director kept using a route that
bypasses the learned PMTU", which points at route caching instead of the
missing IPVS feature. The config fragment in this patch covers CI builds,
but other configs would hit this.
Should a failed ipvsadm call make the test skip, or fail with a message
that names the real cause?
> +
> + ip netns exec "${ns2}" ip addr add "${rip_v6}/64" dev veth21 nodad
> + ip netns exec "${ns2}" ip addr add "${vip_v6}/128" dev lo nodad
> +
> + # Let the director cache its route to the real server
> + udp_send_v6 100
> +
> + send_ptb_v6 1280
> + sleep 0.2
> + if ! ip netns exec "${ns1}" ip -6 route get "${rip_v6}" | grep -q "mtu 1280"; then
> + echo "FAIL: director did not learn the PMTU of the real server"
> + return 1
> + fi
> +
> + # A datagram that exceeds the PMTU must be answered with a packet too
> + # big message, which gives the client a PMTU for the service
> + udp_send_v6 1400
> + if ! ip netns exec "${ns0}" ip -6 route get "${vip_v6}" | grep -q "mtu 1280"; then
> + echo "FAIL: director kept using a route that bypasses the learned PMTU"
> + return 1
> + fi
> +}
[Severity: Medium]
Can this test pass on a kernel that lacks the ip6_dst_check() behaviour it
is meant to cover?
setup() brings up veth10 and veth12 in ns1 and then waits only one second:
ip netns exec "${ns1}" ip link set veth10 up
...
ip netns exec "${ns1}" ip link set veth12 up
...
sleep 1
setup_ns() does not disable accept_dad, so the link-local addresses on
veth10 and veth12 are still tentative at that point.
addrconf_dad_kick() waits a random delay of up to rtr_solicit_delay (1s)
before the first NS. DAD succeeds RETRANS_TIME (1s) after that, so each
interface finishes DAD somewhere between 1s and 2s after link up.
When DAD completes, addrconf_dad_completed() calls rt_genid_bump_ipv6().
__ipv6_ifa_notify() then inserts the host route with ip6_ins_rt(), and
fib6_add() bumps the generation again.
ip6_dst_check() checks the generation before it gets to the exception
check:
net/ipv6/route.c:ip6_dst_check() {
...
if (!rt6_is_valid(rt))
return NULL;
...
rt6_uncached_clone_superseded(rt, from)))
...
}
Suppose an ns1 link-local address finishes DAD after "udp_send_v6 100" and
before "udp_send_v6 1400". The cached dst then fails the check for an
unrelated reason.
__ip_vs_get_out_rt_v6() looks the route up again through
ip6_route_output() and picks up the 1280 MTU exception. The client gets a
packet too big message whether or not rt6_uncached_clone_superseded()
works.
The window between the two sends runs from roughly 1.1-1.6s to roughly
2.0-2.6s after link up. That covers most of the DAD completion range for
both ns1 interfaces, so a false pass seems likely on most runs.
Would setting accept_dad=0 in ns1 before the links come up make this
deterministic? Another option is to wait until
"ip -n $ns1 -6 addr show tentative" is empty before the first
udp_send_v6.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/2026…%40kernel.org