Patchwork Splitting network packets from target modules

login
register
mail settings
Submitter Torsten Luettgert
Date Nov. 15, 2012, 1:49 p.m.
Message ID <20121115144915.427483f6@goldlack.enda.eu>
Download mbox | patch
Permalink /patch/199282/
State Not Applicable
Headers show

Comments

Torsten Luettgert - Nov. 15, 2012, 1:49 p.m.
On Thu, 15 Nov 2012 19:14:44 +0600
arif <aftnix@gmail.com> 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:


Hope that helps,
Torsten
--
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

Patch

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;