Netdev List
 help / color / mirror / Atom feed
From: Justin Iurman <justin.iurman@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org, andrea.mayer@uniroma2.it,
	justin.iurman@gmail.com
Subject: [PATCH net 0/2] ipv6: drop encapsulated packets when no source address is available
Date: Sun, 15 Nov 2026 01:00:45 +0100	[thread overview]
Message-ID: <20261115000047.14669-1-justin.iurman@gmail.com> (raw)

Both ioam6 and seg6 (encap modes) lwtunnels select the source address of
the outer IPv6 header with ipv6_dev_get_saddr() when no tunnel source is
configured, but ignore its return value. When no usable address is
available (e.g. none configured yet in the L3 domain, or only tentative
ones), the outer source address is left untouched:
 - ioam6: it keeps the source address copied from the inner header,
   which may belong to another node for in-transit traffic;
 - seg6: the outer header has just been pushed, so it holds whatever
   stale bytes were in the skb headroom.

Both patches drop the packet in that case, like other encapsulation
failures.

Justin Iurman (2):
  ioam6: drop the packet if no outer source address is available
  seg6: drop the packet if no outer source address is available

 net/ipv6/ioam6_iptunnel.c | 11 +++++++----
 net/ipv6/seg6_iptunnel.c  | 26 ++++++++++++++++++--------
 2 files changed, 25 insertions(+), 12 deletions(-)

-- 
2.34.1


             reply	other threads:[~2026-11-15  0:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15  0:00 Justin Iurman [this message]
2026-11-15  0:00 ` [PATCH net 1/2] ioam6: drop the packet if no outer source address is available Justin Iurman
2026-11-15  0:00 ` [PATCH net 2/2] seg6: " Justin Iurman
2026-11-15 20:08 ` [PATCH net 0/2] ipv6: drop encapsulated packets when no " netdev-bot+sinfo

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=20261115000047.14669-1-justin.iurman@gmail.com \
    --to=justin.iurman@gmail.com \
    --cc=andrea.mayer@uniroma2.it \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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