All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Xiao Liang <shaw.leon@gmail.com>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf] netfilter: nft_exthdr: Fix non-linear header modification
Date: Fri, 25 Aug 2023 05:52:06 +0200	[thread overview]
Message-ID: <20230825035206.GB9265@breakpoint.cc> (raw)
In-Reply-To: <CABAhCOTbKPmzg_5L7EkS+eivNNH=9hjG=q_aCGewB+H4QQgg=A@mail.gmail.com>

Xiao Liang <shaw.leon@gmail.com> wrote:
> > But I would prefer to not mix functional and non-functional changes.
> > Also, the use of the nft_tcp_header_pointer() helper is the reason why
> > this doesn't result in memory corruption.
> 
> I think this makes it explicit that
>     "we are modifying the original packet"
> rather than
>     "we are modifying the packet because above skb_ensure_writable() is enough"

OK, I won't argue here.

> > Just use the above in nft_exthdr_tcp_set_eval and place it before the loop?
> 
> In this case, all TCP headers will be pulled even if they don't have
> the target option.

Keep it simple.

      reply	other threads:[~2023-08-25  3:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25  2:14 [PATCH nf] netfilter: nft_exthdr: Fix non-linear header modification Xiao Liang
2023-08-25  3:11 ` Florian Westphal
2023-08-25  3:23   ` Xiao Liang
2023-08-25  3:34   ` Xiao Liang
2023-08-25  3:52     ` Florian Westphal [this message]

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=20230825035206.GB9265@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=shaw.leon@gmail.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 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.