From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, fw@strlen.de
Subject: Re: [PATCH nf-next 1/2] netfilter: nft_payload: simplify vlan header handling
Date: Thu, 31 Oct 2019 17:18:42 +0100 [thread overview]
Message-ID: <20191031161842.GK876@breakpoint.cc> (raw)
In-Reply-To: <20191031145122.3741-2-pablo@netfilter.org>
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> If the offset is within the ethernet + vlan header size boundary, then
> rebuild the ethernet + vlan header and use it to copy the bytes to the
> register. Otherwise, subtract the vlan header size from the offset and
> fall back to use skb_copy_bits().
>
> There is one corner case though: If the offset plus the length of the
> payload instruction goes over the ethernet + vlan header boundary, then,
> fetch as many bytes as possible from the rebuilt ethernet + vlan header
> and fall back to copy the remaining bytes through skb_copy_bits().
This looks simpler indeed.
Acked-by: Florian Westphal <fw@strlen.de>
next prev parent reply other threads:[~2019-10-31 16:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-31 14:51 [PATCH nf-next 0/2] Revisit vlan support Pablo Neira Ayuso
2019-10-31 14:51 ` [PATCH nf-next 1/2] netfilter: nft_payload: simplify vlan header handling Pablo Neira Ayuso
2019-10-31 16:18 ` Florian Westphal [this message]
2019-10-31 14:51 ` [PATCH nf-next 2/2] netfilter: nf_tables: add nft_payload_rebuild_vlan_hdr() Pablo Neira Ayuso
2019-10-31 16:14 ` Florian Westphal
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=20191031161842.GK876@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/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;
as well as URLs for NNTP newsgroup(s).