From: "Kanhu Rauta" <choiskanhu@gmail.com>
To: linux-net@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Problem With LOCAL IN HOOK
Date: Tue, 6 Mar 2007 16:57:11 +0530 [thread overview]
Message-ID: <4c348ac20703060327t44450331la1be820bc146d308@mail.gmail.com> (raw)
Hi list,
I am writing a simple loadable module which will a register a function
in NF_IP_LOCAL_IN hook .But observed different behavior in 2.4 and
2.6 kernel.
a> in 2.4 kernel, my function gets the assembled packet (in case of
fragmentation).
static struct nf_hook_ops test_forwarder
= { { NULL, NULL }, callback_forwarder, PF_INET, NF_IP_LOCAL_IN,
NF_IP_PRI_FILTER };
This is working fine .i got the assembled packet in function
callback_forwarder(in case of fragmentation).
b> in 2.6 kernel, my function gets the un-assembled packets (in case
of fragmentation).
static struct nf_hook_ops test_forwarder = {
.hook = callback_forwarder,
.owner = THIS_MODULE,
.pf = PF_INET,
.hooknum = NF_IP_LOCAL_IN,
.priority = NF_IP_PRI_FILTER, };
This is not working, because i got the unassembled packet here. though
udp length shows 1508.but i am getting only 1400 bytes of valid data,
rest 108 bytes are something garbage.that i cross check with ethereal.
(I prints in a for loop like skb-data+20 to skb->data[1528])
I am not able to understand the behavior and struggled to resolve this
issue for last 1 week .
Can anybody help me on this regard ?
Regards,
kanhu
next reply other threads:[~2007-03-06 11:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 11:27 Kanhu Rauta [this message]
2007-03-06 14:44 ` James Morris
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=4c348ac20703060327t44450331la1be820bc146d308@mail.gmail.com \
--to=choiskanhu@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net@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
all inboxes | Powered by JetHome®