]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
TEE: resolve compile error with Linux 2.6.36-rc
authorJan Engelhardt <jengelh@medozas.de>
Wed, 22 Sep 2010 21:08:28 +0000 (23:08 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Wed, 22 Sep 2010 21:37:19 +0000 (23:37 +0200)
xt_TEE.c:54:19: error: request for member "dst" in something not a
structure or union
xt_TEE.c:55:20: error: "struct rtable" has no member named "u"

Linux kernel commit v2.6.36-rc1~571^2~616 changed this.

doc/changelog.txt
extensions/compat_xtables.h
extensions/xt_TARPIT.c
extensions/xt_TEE.c

index 870a57d5766c8e2aabbe2354ba4f302bac397d07..b1cbc3692eb709d54ab8c98c4edff4c67d49a8bc 100644 (file)
@@ -4,6 +4,7 @@ HEAD
 - compat_xtables: return bool for match_check and target_check in 2.6.23..34
 - ipset: enable building of ip_set_ipport{ip,net}hash.ko
 - SYSRQ: resolve compile error with Linux 2.6.36
+- TEE: resolve compile error with Linux 2.6.36
 
 
 Xtables-addons 1.28 (July 24 2010)
index 92748a8208edfa35de9349e9f3d7f1348e498cf0..db36980d0918ffa5b045b988118beced69116cf4 100644 (file)
 #      define ip6t_unregister_table(tbl) ip6t_unregister_table(tbl)
 #endif
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
+#      define rt_dst(rt)       (&(rt)->dst)
+#else
+#      define rt_dst(rt)       (&(rt)->u.dst)
+#endif
 
 #if !defined(NIP6) && !defined(NIP6_FMT)
 #      define NIP6(addr) \
index 92bea2cf49a530eadb7c79dbc81f87e5405e482f..16887d9d2821caffd3251297a15c9bc967a7e8f8 100644 (file)
@@ -73,7 +73,7 @@ static void tarpit_tcp(struct sk_buff *oldskb, unsigned int hook)
        /* Rate-limit replies to !SYN,ACKs */
 #if 0
        if (!oth->syn && oth->ack)
-               if (!xrlim_allow(&ort->u.dst, HZ))
+               if (!xrlim_allow(rt_dst(ort), HZ))
                        return;
 #endif
 
index e98333bb70b954126117d361a1d5efe69d3b2692..0d9edb1b2d88fa08f80477949dad072ef5f224dd 100644 (file)
@@ -51,8 +51,8 @@ tee_tg_route4(struct sk_buff *skb, const struct xt_tee_tginfo *info)
                return false;
 
        dst_release(skb_dst(skb));
-       skb_dst_set(skb, &rt->u.dst);
-       skb->dev      = rt->u.dst.dev;
+       skb_dst_set(skb, rt_dst(rt));
+       skb->dev      = rt_dst(rt)->dev;
        skb->protocol = htons(ETH_P_IP);
        return true;
 }