From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jerry Yu <jerryy@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Protocol handler using dev_add_pack
Date: Wed, 11 Jul 2012 16:17:19 +0200 [thread overview]
Message-ID: <1342016239.3265.8007.camel@edumazet-glaptop> (raw)
In-Reply-To: <CAP2AAQMvx5yxVRLN4AT_YdsFJAUDRgSNwzq0A3x8JyZgXKEjmw@mail.gmail.com>
On Wed, 2012-07-11 at 10:38 -0300, Jerry Yu wrote:
> I am working on a kernel module to monitor all TCP packets. I created a protocol
> handler with protocol code ETH_P_ALL to handle all incoming and outgoing
> TCP packets. The code worked fine on 2.6.14 kernel, but in current 3.2.0-26
> kernel, I am no longer able to get the TCP payload for outgoing packets.
> The data in TCP payload section of skb->data are mainly 0x00. I am still
> able to get incoming TCP packets' payloads though.
>
> Is there any change in 3.2.0 or other early kernel versions that will cause
> this issue?
Maybe you make wrong assumptions in your code.
skb->data doesnt exactly contains tcp payload of locally generated TCP
packets, unless you disabled scatter-gather on the NIC
ehtool -K eth0 sg off
next prev parent reply other threads:[~2012-07-11 14:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 13:38 Protocol handler using dev_add_pack Jerry Yu
2012-07-11 14:17 ` Eric Dumazet [this message]
2012-07-12 18:05 ` Jerry Yu
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=1342016239.3265.8007.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=jerryy@gmail.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox