mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Omar Ramadan <omar@blockcast.net>
To: netdev-bot+sashiko@kernel.org
Cc: ap420073@gmail.com, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	shuah@kernel.org, horms@kernel.org, netdev@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	willemb@google.com
Subject: Re: [PATCH net-next v4 02/12] amt: send the Relay Advertisement over IPv6
Date: Mon, 30 Nov 2026 06:41:00 +0000	[thread overview]
Message-ID: <20261130064101.1857363-1-omar@blockcast.net> (raw)
In-Reply-To: <179601051051.3146.13369414407667117379@kernel.org>

On Mon, 30 Nov 2026 03:48:30 +0000, netdev-bot+sashiko@kernel.org 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

  reply	other threads:[~2026-11-30  6:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29  3:46 [PATCH net-next v4 00/12] amt: add an IPv6 outer transport Omar Ramadan
2026-11-29  3:46 ` [PATCH net-next v4 01/12] amt: create an AF_INET6 encapsulation socket for an IPv6 outer address Omar Ramadan
2026-11-29  3:46 ` [PATCH net-next v4 02/12] amt: send the Relay Advertisement over IPv6 Omar Ramadan
2026-11-30  3:48   ` netdev-bot+sashiko
2026-11-30  6:41     ` Omar Ramadan [this message]
2026-11-29  3:46 ` [PATCH net-next v4 03/12] amt: key relay tunnels on a union amt_addr endpoint Omar Ramadan
2026-11-29  3:46 ` [PATCH net-next v4 04/12] amt: send the Membership Query over IPv6 Omar Ramadan
2026-11-29  3:46 ` [PATCH net-next v4 05/12] amt: forward multicast data " Omar Ramadan
2026-11-30  3:48   ` netdev-bot+sashiko
2026-11-30  6:41     ` Omar Ramadan
2026-11-29  3:46 ` [PATCH net-next v4 06/12] amt: size the encapsulation headroom by the outer IP version Omar Ramadan
2026-11-29  3:46 ` [PATCH net-next v4 07/12] amt: send the AMT gateway control plane over IPv6 Omar Ramadan
2026-11-29  3:46 ` [PATCH net-next v4 08/12] amt: receive " Omar Ramadan
2026-11-29  3:46 ` [PATCH net-next v4 09/12] amt: add netlink attributes for an IPv6 outer transport Omar Ramadan
2026-11-29  3:46 ` [PATCH net-next v4 10/12] MAINTAINERS: amt: cover the amt headers and selftests Omar Ramadan
2026-11-29  3:46 ` [PATCH net-next v4 11/12] selftests: net: add amt_v6.sh for an IPv6 outer transport Omar Ramadan
2026-11-30  3:48   ` netdev-bot+sashiko
2026-11-30  6:41     ` Omar Ramadan
2026-11-29  3:46 ` [PATCH net-next v4 12/12] selftests: net: add amt_gw_v6.sh for the IPv6 netlink attributes Omar Ramadan
2026-11-30  3:48   ` netdev-bot+sashiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261130064101.1857363-1-omar@blockcast.net \
    --to=omar@blockcast.net \
    --cc=andrew+netdev@lunn.ch \
    --cc=ap420073@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®