Re: Sending the captured packets at NF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- suresh kumar <suresh_vin@indiainfo.com> wrote:
> I have implemented, IP tunnelling in kernel by hooking to Netfilters. The
> implementation goes as a module. I am sending the packet out by calling
> dev_queue_xmit by filling the required fields in the skb and returning
> NF_STOLEN. I just want to know, if I capture a packet at pre/post routing
> hook and mangle the IP addresses(which could result in local/forward
> delivery) and return NF_ACCEPT to corresponding  NF hook, would the packet be
> routed. 

Presumably, only if you do it at PRE-routing, no?

>This is required so that, if any module registered to NF after this
> tunneling module, can also get the packet and also I don't need to fill in
> the fields in the skb and call dev_queue_xmit. 

Note that, depending on the requirements, it is also possible to create a
tunnel and then use the rtnetlink libs to add a route to it to the routing
tables and avoid the netfilter thing. Good luck finding docs on rtnetlink
though...

cam

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you?re looking for faster
http://search.yahoo.com

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux