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] Both the commit message and the new comment above struct
amt_header_advertisement_v6 in include/net/amt.h ("s5.2 selects the…
--
amt: send the Relay Advertisement over IPv6
This adds struct amt_header_advertisement_v6 and
amt_send_advertisement_v6(), which send the 24-byte IPv6 form of the
Relay Advertisement. They use a new amt_send_ctrl_v6()/amt_route6() pair
built on udp_tunnel6_xmit_skb(). On an IPv6 device, amt_discovery_handler()
answers a Discovery with this form, sent from the address the Discovery
was sent to; amt_v6() is still false for every device, so there is no
functional change yet.
> diff --git a/include/net/amt.h b/include/net/amt.h
> index ca35782f8d3a2..52d77bc6b4193 100644
> --- a/include/net/amt.h
> +++ b/include/net/amt.h
> @@ -133,6 +133,27 @@ struct amt_header_advertisement {
> __be32 ip4;
> } __packed;
>
> +/* The IPv6 form of the Relay Advertisement (RFC 7450 s5.1.2): the same
> + * header and nonce, followed by a 16-byte relay address. s5.2 selects the
> + * form from the IP version of the outer header, not from a field in the
> + * message, so it is a type of its own.
> + */
[Severity: Low]
Is this an accurate reading of RFC 7450?
As far as I can tell, section 5.1.2.1 says the Relay Address field holds
either an IPv4 or an IPv6 address, and the length of the Advertisement
tells you which. Section 5.2 is about gateway operation. It doesn't seem
to tie the Advertisement family to the outer header version.
The commit message makes the same claim:
... and s5.2 selects the form from the IP
version of the outer header rather than from a field in the message.
An amt relay on an IPv6 outer transport therefore has to answer with
the 24-byte IPv6 form.
So does the new comment in amt_discovery_handler():
/* The Advertisement takes the form of the outer IP version, and
* RFC 7450 s5.1.2 sources it from the address the Discovery was
...
A later patch in this series, "amt: receive the AMT gateway control plane
over IPv6", describes it differently in amt_advertisement_handler():
/* The two forms differ only in their length. An IPv6 device's family
* picks one, so a message of the other form is not accepted; an IPv4
* device keeps the minimum-length check it always had.
*/
That comment reads as though length is what tells the two forms apart,
and matching the Advertisement family to the device's outer family is a
choice this driver makes.
The code looks fine. Could this header comment, the comment in
amt_discovery_handler() and the commit message describe this as driver
policy rather than something RFC 7450 s5.2 requires?
> +struct amt_header_advertisement_v6 {
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/2026…%40blockcast.net