Re: Splitting network packets from target modules

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

 



On Thu, 15 Nov 2012 19:14:44 +0600
arif <aftnix@xxxxxxxxx> wrote:

> But i'm confused how i'm going to send these new skbs to uplink.
> returning NF_ACCEPT will not do the trick i guess.
> 
> Is there any existing target module which tries to do send multiple
> skbs to uplink?

I'd guess TEE would be the right place to look at since it creates
another packet and sends it on. But beware, it's buggy in current
kernels, a fix by Eric Dumazet is required:

diff --git a/net/netfilter/xt_TEE.c b/net/netfilter/xt_TEE.c
index ee2e5bc..bd93e51 100644
--- a/net/netfilter/xt_TEE.c
+++ b/net/netfilter/xt_TEE.c
@@ -70,6 +70,7 @@ tee_tg_route4(struct sk_buff *skb, const struct
xt_tee_tginfo *info) fl4.daddr = info->gw.ip;
 	fl4.flowi4_tos = RT_TOS(iph->tos);
 	fl4.flowi4_scope = RT_SCOPE_UNIVERSE;
+	fl4.flowi4_flags = FLOWI_FLAG_KNOWN_NH;
 	rt = ip_route_output_key(net, &fl4);
 	if (IS_ERR(rt))
 		return false;

Hope that helps,
Torsten
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux