mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-08 21:54:57 +02:00
xt_TARPIT: fix kernel warning about RTAX_HOPLIMIT being used
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
HEAD
|
HEAD
|
||||||
====
|
====
|
||||||
|
- xt_TARPIT: fix kernel warning about RTAX_HOPLIMIT being used
|
||||||
|
|
||||||
|
|
||||||
v1.37 (2011-06-25)
|
v1.37 (2011-06-25)
|
||||||
|
@@ -232,7 +232,11 @@ static void tarpit_tcp(struct sk_buff *oldskb, unsigned int hook,
|
|||||||
if (mode == XTTARPIT_HONEYPOT)
|
if (mode == XTTARPIT_HONEYPOT)
|
||||||
niph->ttl = 128;
|
niph->ttl = 128;
|
||||||
else
|
else
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
|
||||||
|
niph->ttl = ip4_dst_hoplimit(skb_dst(nskb));
|
||||||
|
#else
|
||||||
niph->ttl = dst_metric(skb_dst(nskb), RTAX_HOPLIMIT);
|
niph->ttl = dst_metric(skb_dst(nskb), RTAX_HOPLIMIT);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Adjust IP checksum */
|
/* Adjust IP checksum */
|
||||||
niph->check = 0;
|
niph->check = 0;
|
||||||
|
Reference in New Issue
Block a user