lkml.org 
[lkml]   [2006]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to re-send out the packets captured by my hook function at NF_IP_PRE_ROUTING
Real Oneone wrote:
> Hi, I plugged a callback function into netfilter at the hook point of
> NF_IP_PRE_ROUTING, tring to capture all the packets, make
> some changes to some of them, and invoke skb->dev->hard_start_xmit to
> send them out directly. However, the kernel crashed before I could get
> any printked information.
>
> If you have any idea of how to send the received packets out, please tell me.

You might want to explore the possibilities of the existing "ip_queue"
kernel extension instead, it was design to do packet
capture/inspection/changing in userspace.

FireFlier works that way ( http://fireflier.sourceforge.net/ ) and so
does inlined snort (http://www.snort.org/docs/snort_manual/node7.html).

You can take a look at:
http://www.linuxia.de/netfilter.en.html#userspace and
http://www.cs.princeton.edu/~nakao/libipq.htm for an example application.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-26 17:32    [W:1.512 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site