Re: [PATCH net-next v2 3/12] amt: key relay tunnels on a union amt_addr endpoint

From: Omar Ramadan

Date: Fri Nov 27 2026 - 04:44:40 EST


On Thu, 26 Nov 2026 19:16:56 +0000, netdev-bot+sashiko@xxxxxxxxxx wrote:
> Does an exact 16-byte compare still make the per-source cap work on an
> IPv6 relay?

No. Counting per /128 lets one host that owns a /64 open the cap's worth
of tunnels from each of its addresses, and the MAC check only shows that
the sender can receive at the address it used. Eight addresses and the
default 16 per source fill a table of 128.

v3 counts the tunnels of one source with amt_same_source(), which
compares the first 64 bits of an IPv6 address and the whole of an IPv4
one. Both the early check in amt_request_handler() and the one in
amt_tunnel_get_or_create() use it. A tunnel is still found by its full
endpoint, so gateways in one /64 each keep their own tunnel and share
the cap. Patch 11 now has a case for it: with max_tunnels 16, which
allows two per source, two gateways fill their /64 and a third one in
it, with an address of its own, gets no Membership Query and no
multicast, while a gateway in another /64 gets both.

The /64 is fixed, not configurable: the cap is a bound on one host, and
a host that is given less than a /64 is simply counted with its
neighbours.

> The commit message only says that the per-source count "compares the
> same way".

It says what the count does now.

I will send v3.

pw-bot: cr

--
Omar