Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by netdev-bot+sashiko
Mon, 30 Nov 2026 03:48
Re: [PATCH net-next v4 12/12] selftests: net: add amt_gw_v6.sh for the IPv6 netlink attributes
Author: netdev-bot+sashiko
Date: Mon, 30 Nov 2026 03:48
Date: Mon, 30 Nov 2026 03:48
68 lines
10659 bytes
10659 bytes
Thank you for your contribution! Sashiko AI review found more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you respin. Low priority / nit picks for your consideration: - [Low] The file header of tools/testing/selftests/net/amt_gw_v6.sh (lines 8-12) contradicts probe_v6_gateway() in the same file. -- selftests: net: add amt_gw_v6.sh for the IPv6 netlink attributes This adds a netlink-only selftest for the AMT IPv6 attributes, IFLA_AMT_LOCAL_IP6 and IFLA_AMT_DISCOVERY_IP6. It checks that IPv6 and IPv4 local and discovery addresses read back through amt_fill_info(), and that each invalid combination is rejected with the expected extack message. A probe skips the test when iproute2 or the kernel lacks IPv6 AMT support. > diff --git a/tools/testing/selftests/net/amt_gw_v6.sh b/tools/testing/selftests/net/amt_gw_v6.sh > new file mode 100755 > index 0000000000000..b1467f3121bd8 > --- /dev/null > +++ b/tools/testing/selftests/net/amt_gw_v6.sh > @@ -0,0 +1,219 @@ > +#!/bin/bash > +# SPDX-License-Identifier: GPL-2.0 > +# > +# Netlink coverage for the AMT IPv6 attributes, IFLA_AMT_LOCAL_IP6 and > +# IFLA_AMT_DISCOVERY_IP6, and the rules that validate them. amt_v6.sh covers > +# the data plane; this needs only one netns and one dummy device. > +# > +# Not covered: `discovery <v4>` together with `discovery <v6>`, or `local <v4>` > +# together with `local <v6>`, in one command. iproute2 rejects the duplicate > +# argument itself, so those checks are reachable only from a raw netlink > +# client, as is a 16-byte IFLA_AMT_LOCAL_IP or IFLA_AMT_DISCOVERY_IP, which > +# the exact-length policy refuses before any rule here runs. [Severity: Low] This isn't a bug, but does this header comment match what probe_v6_gateway() does later in the same file? The header lists a 16-byte IFLA_AMT_LOCAL_IP or IFLA_AMT_DISCOVERY_IP under "Not covered" and says only a raw netlink client can send one. probe_v6_gateway() expects that same refusal from an older iproute2 that packs the IPv6 literal into the 4-byte IPv4 attribute. It also logs the refusal as a passing test before it skips: *"binary attribute size out of range"*) # An older iproute2 on this kernel: the exact length of # the IPv4 attribute is what refused the 16 bytes. RET=0 log_test "16-byte IPv4 address attribute is refused" The commit message says the case is "reachable only from a raw netlink client or an older iproute2", which agrees with the probe. Could the header drop the 16-byte clause from the "Not covered" list and mention the older iproute2 path? The other option is for the probe to stop calling log_test for this case. [ ... ] -- Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261129034652.1853485-1-omar%40blockcast.net
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads