From: Fr3DBr <fr3dbr@gmail.com>
To: Jeff Haran <jharan@bytemobile.com>
Cc: "netfilter-devel@vger.kernel.org" <netfilter-devel@vger.kernel.org>
Subject: Re: Netfilter Packet Reinjection
Date: Fri, 23 Mar 2012 19:22:26 -0300 [thread overview]
Message-ID: <CAMpo4z2YMZDv1vAAevK1Q_k37nCPhZpuLAvErK5O8BN0mbaZgw@mail.gmail.com> (raw)
In-Reply-To: <471DE477E2B1F549A58F3A14A27180BE014CD8@HQ-EX01.bytemobile.com>
Ok i get you.
Could you tell me how one must instantiate the nf queue entry in order
to use the nf_reinject method ?
Em 23 de março de 2012 19:20, Jeff Haran <jharan@bytemobile.com> escreveu:
>> -----Original Message-----
>> Em 23 de março de 2012 19:11, Jeff Haran <jharan@bytemobile.com>
>> escreveu:
>> >> -----Original Message-----
>> >> From: netfilter-devel-owner@vger.kernel.org [mailto:netfilter-devel-
>> >> owner@vger.kernel.org] On Behalf Of Fr3DBr
>> >> Sent: Friday, March 23, 2012 2:59 PM
>> >> To: netfilter-devel@vger.kernel.org
>> >> Subject: Netfilter Packet Reinjection
>> >>
>> >> Hello,
>> >>
>> >> I'm writting a module to deal with certain packets, and i wanted to
>> >> DROP then initially, store it, and at an later moment, reinject it
>> >> before the routing decision.
>> >>
>> >> What would be the method i could call, to place the packet again in
>> >> the stack at this point ?!
>> >>
>> >> Thanks,
>> >>
>> >> Fred
>> >
>> > You probably want to take a look at nf_reinject() in
>> net/netfilter/nf_queue.c.
>> >
>> > Jeff Haran
>> From: Fr3DBr [mailto:fr3dbr@gmail.com]
>> Sent: Friday, March 23, 2012 3:12 PM
>> To: Jeff Haran
>> Cc: netfilter-devel@vger.kernel.org
>> Subject: Re: Netfilter Packet Reinjection
>> I did, but i didn't wanted to implement a queue, but just do what i
>> said directly !
>>
>
> Fixing the top post.
>
> I assume by "I didn't wanted to implement a queue", you meant you didn't want to use an NF_QUEUE to put the packets to user space.
>
> Fine. Nobody said you had to use a user space queue. But if you want to hang onto packets for later re-injection, calling nf_reinject() is one way to do it.
>
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-03-23 22:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-23 21:58 Netfilter Packet Reinjection Fr3DBr
2012-03-23 22:11 ` Jeff Haran
2012-03-23 22:12 ` Fr3DBr
2012-03-23 22:20 ` Jeff Haran
2012-03-23 22:22 ` Fr3DBr [this message]
2012-03-23 22:55 ` Jan Engelhardt
2012-03-23 23:04 ` Fr3DBr
2012-03-23 23:06 ` Jan Engelhardt
2012-03-23 23:09 ` Fr3DBr
2012-03-24 20:20 ` Fr3DBr
2012-03-24 21:31 ` Pablo Neira Ayuso
2012-03-25 1:24 ` Fr3DBr
2012-03-25 1:54 ` Jan Engelhardt
2012-03-25 1:57 ` Fr3DBr
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=CAMpo4z2YMZDv1vAAevK1Q_k37nCPhZpuLAvErK5O8BN0mbaZgw@mail.gmail.com \
--to=fr3dbr@gmail.com \
--cc=jharan@bytemobile.com \
--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 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).