All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>,  bpf@vger.kernel.org
Cc: netdev@vger.kernel.org,  davem@davemloft.net,
	 edumazet@google.com,  pabeni@redhat.com,  andrew+netdev@lunn.ch,
	 horms@kernel.org,  Jakub Kicinski <kuba@kernel.org>,
	 maze@google.com,  willemdebruijn.kernel@gmail.com,
	 ast@kernel.org,  daniel@iogearbox.net,  andrii@kernel.org,
	 martin.lau@linux.dev,  eddyz87@gmail.com,  song@kernel.org,
	 yonghong.song@linux.dev,  john.fastabend@gmail.com,
	 kpsingh@kernel.org,  sdf@fomichev.me,  haoluo@google.com,
	 jolsa@kernel.org
Subject: Re: [PATCH bpf-next v2 1/2] net: clear the dst when performing encap / decap
Date: Mon, 30 Mar 2026 09:42:26 -0400	[thread overview]
Message-ID: <willemdebruijn.kernel.15a62f8f2870@gmail.com> (raw)
In-Reply-To: <20260329180428.2657785-1-kuba@kernel.org>

Jakub Kicinski wrote:
> Commit ba9db6f907ac ("net: clear the dst when changing skb protocol")
> added dst clearing when a BPF program changes the skb protocol
> (e.g. IPv4 to IPv6). Since that was a fix we only cleared the dst when
> the L3 protocol actually changes to keep it minimal. As suggested during
> the discussion (see Link) encap or decap operation which wraps or unwraps
> a same-protocol header may also render the existing dst incorrect - even
> if that doesn't result in a crash, just the wrong route for the now-outermost
> IP dst.
> 
> Make dropping dst unconditional for bpf_skb_change_proto() and all
> L3 encap / decap ops.
> 
> Link: https://lore.kernel.org/CANP3RGfRaYwve_xgxH6Tp2zenzKn2-DjZ9tg023WVzfdJF3p_w@mail.gmail.com
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Reviewed-by: Willem de Bruijn <willemb@google.com>

  parent reply	other threads:[~2026-03-30 13:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-29 18:04 [PATCH bpf-next v2 1/2] net: clear the dst when performing encap / decap Jakub Kicinski
2026-03-29 18:04 ` [PATCH bpf-next v2 2/2] selftests/bpf: test that dst is cleared on same-protocol encap Jakub Kicinski
2026-03-30  8:03   ` Daniel Borkmann
2026-03-30 23:29     ` Jakub Kicinski
2026-03-31  0:29       ` Martin KaFai Lau
2026-03-30  7:48 ` [PATCH bpf-next v2 1/2] net: clear the dst when performing encap / decap Daniel Borkmann
2026-03-30 13:42 ` Willem de Bruijn [this message]
2026-03-30 22:20 ` patchwork-bot+netdevbpf

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=willemdebruijn.kernel.15a62f8f2870@gmail.com \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=eddyz87@gmail.com \
    --cc=edumazet@google.com \
    --cc=haoluo@google.com \
    --cc=horms@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=maze@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.