Re: [PATCH net-next v4 02/12] amt: send the Relay Advertisement over IPv6
From: Omar Ramadan
Date: Mon Nov 30 2026 - 01:41:10 EST
On Mon, 30 Nov 2026 03:48:30 +0000, netdev-bot+sashiko@xxxxxxxxxx wrote:
> Will a Discovery whose outer IPv6 source is one of the relay's own
> addresses still be answered here?
Yes, and that is a real gap. IPv6 input drops only a loopback or a
multicast source (ip6_rcv_core()), while IPv4 refuses a source that is
one of the host's own addresses as a martian when it comes in from the
wire, since accept_local is 0. A Discovery from one of the relay's
addresses to another of them gets an Advertisement sent to that address
over lo, with the sender's nonce and port, so the IPv4 path never
answers itself that way.
> Would it make sense to drop a Discovery whose outer source is a local
> address, for example with ipv6_chk_addr()? At minimum, could a
> Discovery with saddr equal to daddr be dropped?
v5 drops it, in amt_rcv() of 8/12 rather than in the Discovery handler:
a relay drops any packet whose outer source is an address that
ipv6_chk_addr() finds on a device of the namespace, before it parses the
message. That also covers a Request, whose Membership Query goes to the
same kind of source, and an Update. An address on a VRF slave or a
tentative one is not found. A packet that arrives over lo is not
dropped, because it comes from the host itself and IPv4 accepts it too,
so a gateway on the relay's host still reaches its relay. The Discovery
handler's own checks are unchanged. 11/12 sends such a Discovery in from
the wire, from a namespace that holds the relay's address on its lo
only, and fails unless the relay counts it in rx_dropped and nothing
answers on lo; the same Discovery over lo is answered.
I will send v5.
pw-bot: cr
--
Omar