]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
xt_TEE: do not retain iif and mark on cloned packet
authorJan Engelhardt <jengelh@medozas.de>
Fri, 2 Apr 2010 14:59:13 +0000 (16:59 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Sun, 4 Apr 2010 22:47:08 +0000 (00:47 +0200)
Patrick McHardy explains in [1] that locally-generated packets (such
as the clones xt_TEE will create) usually start with no iif and no
mark value, and even if cloned packets are a little more special than
locally-generated ones, let's do it that way.

[1] http://marc.info/?l=netfilter-devel&m=127012289008156&w=2

doc/changelog.txt
extensions/xt_TEE.c

index 9f40d1f445f3f03074ca3b649de896279227bef0..556e4f0d71458ffbbfb28b9810b6cd3a2729b9dd 100644 (file)
@@ -6,6 +6,7 @@ HEAD
 - TEE: set dont-fragment on cloned packets
 - TEE: free skb when route lookup failed
 - TEE: do not limit use to mangle table
+- TEE: do not retain iif and mark on cloned packet
 
 
 Xtables-addons 1.24 (March 17 2010)
index 4614a48917a8108638b0ec670215dacd6f953efc..af5173f82ce52638fb3fa5aa739947899c468a30 100644 (file)
@@ -60,12 +60,6 @@ tee_tg_route4(struct sk_buff *skb, const struct xt_tee_tginfo *info)
        struct flowi fl;
 
        memset(&fl, 0, sizeof(fl));
-       fl.iif = skb_ifindex(skb);
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19)
-       fl.nl_u.ip4_u.fwmark = skb_nfmark(skb);
-#else
-       fl.mark = skb_nfmark(skb);
-#endif
        fl.nl_u.ip4_u.daddr = info->gw.ip;
        fl.nl_u.ip4_u.tos   = RT_TOS(iph->tos);
        fl.nl_u.ip4_u.scope = RT_SCOPE_UNIVERSE;
@@ -231,13 +225,6 @@ tee_tg_route6(struct sk_buff *skb, const struct xt_tee_tginfo *info)
        struct flowi fl;
 
        memset(&fl, 0, sizeof(fl));
-       fl.iif = skb_ifindex(skb);
-       /* No mark in flowi before 2.6.19 */
-#if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 19)
-       fl.nl_u.ip6_u.fwmark = skb_nfmark(skb);
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
-       fl.mark = skb_nfmark(skb);
-#endif
        fl.nl_u.ip6_u.daddr = info->gw.in6;
        fl.nl_u.ip6_u.flowlabel = ((iph->flow_lbl[0] & 0xF) << 16) |
                (iph->flow_lbl[1] << 8) | iph->flow_lbl[2];