TEE: resolve compile error with Linux 2.6.36-rc

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.
This commit is contained in:
Jan Engelhardt
2010-09-22 23:08:28 +02:00
parent 442982f04e
commit 03ec8a7696
4 changed files with 9 additions and 3 deletions

View 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)

View File

@@ -86,6 +86,11 @@
# 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) \

View 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

View 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;
}