mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-06 20:55:13 +02:00
xt_TARPIT: fix kernel warning about RTAX_HOPLIMIT being used
This commit is contained in:
@@ -232,7 +232,11 @@ static void tarpit_tcp(struct sk_buff *oldskb, unsigned int hook,
|
||||
if (mode == XTTARPIT_HONEYPOT)
|
||||
niph->ttl = 128;
|
||||
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);
|
||||
#endif
|
||||
|
||||
/* Adjust IP checksum */
|
||||
niph->check = 0;
|
||||
|
Reference in New Issue
Block a user