From: Patrick McHardy <kaber@trash.net>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v2 0/3] src: trace infrastructure support
Date: Fri, 27 Nov 2015 01:33:54 +0000 [thread overview]
Message-ID: <20151127013353.GB4263@macbook.localdomain> (raw)
In-Reply-To: <1448560779-28989-1-git-send-email-fw@strlen.de>
On 26.11, Florian Westphal wrote:
> This is V2 of the nft trace patch set.
>
> See the individual patches for a change vs. v1 description.
>
> Patrick: I did a quick test w. your last public patches
> (plus a few minor changes to make it build again) and things
> seem to work fine.
>
> What does not work correctly is decoding of vlan header.
> I think whats happening is that we cannot splice sub-byte
> sized quantities from a larger chunk.
I've managed to decode it properly, so the kernel part is fine:
ether saddr 63:f6:4b:00:54:52 ether daddr c9:4b:a9:00:54:52 vlan pcp 0 vlan cfi 0 vlan id 1000 vlan type ip ip saddr 10.0.0.1 ip daddr 10.0.0.2 ip tos 0 ip ttl 64 ip id 61847 ip length 84 icmp type echo-request icmp code 0 icmp id 29049 icmp sequence 4267 icmp type 61 icmp code 177 icmp id 0 icmp sequence 0 icmp type 116 icmp code 211
There are a number of problems however. The easy one is wrong header
definitions in nft, also my decoding is a bit hackish so far and occasionally
causes endless loops, I'll fix that.
The somewhat bigger problem are some inconsistencies. Usually we can see
the original lower layer header on the receive path in the higher layers,
f.i. the ethernet header. With VLAN offloading this doesn't work since we
loose the meta data once the packet has been received through the VLAN code.
This means we'll just see a regular ethernet header.
This does not only affect tracing, but anything that wants to access that
header. Its not a *huge* problem, but it is unexpected for the user,
especially since he is able to treat the offloaded header like a regular
VLAN header before "decapsulation".
I have no good suggestion what to do about that. The information in the skb
is gone. The only possibility I can think of is to reconstruct (most of) it
based on the incoming device, the known upper protocol and skb->priority,
but that's quite ugly.
prev parent reply other threads:[~2015-11-27 1:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 17:59 [PATCH v2 0/3] src: trace infrastructure support Florian Westphal
2015-11-26 17:59 ` [PATCH v2 libnftnl 1/3] src: add " Florian Westphal
2015-11-26 22:11 ` Patrick McHardy
2015-11-26 17:59 ` [PATCH v2 nf-next 2/3] netfilter: nf_tables: extend tracing infrastructure Florian Westphal
2015-11-26 23:20 ` Patrick McHardy
2015-11-27 0:10 ` Florian Westphal
2015-11-27 1:24 ` Patrick McHardy
2015-11-27 8:47 ` Patrick McHardy
2015-11-27 9:23 ` Florian Westphal
2015-11-26 17:59 ` [PATCH v2 nf-next 3/3] netfilter: nf_tables: wrap tracing with a static key Florian Westphal
2015-11-26 21:30 ` Patrick McHardy
2015-11-26 20:53 ` [PATCH v2 0/3] src: trace infrastructure support Patrick McHardy
2015-11-27 1:33 ` Patrick McHardy [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=20151127013353.GB4263@macbook.localdomain \
--to=kaber@trash.net \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.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 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.