mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-20 19:44:56 +02:00
xt_ECHO: fix kernel warning about RTAX_HOPLIMIT being used
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
HEAD
|
HEAD
|
||||||
====
|
====
|
||||||
|
Fixes:
|
||||||
|
- xt_ECHO: fix kernel warning about RTAX_HOPLIMIT being used
|
||||||
|
|
||||||
|
|
||||||
v1.39 (2011-09-21)
|
v1.39 (2011-09-21)
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
# include <linux/netfilter_bridge.h>
|
# include <linux/netfilter_bridge.h>
|
||||||
#endif
|
#endif
|
||||||
#include <net/ip.h>
|
#include <net/ip.h>
|
||||||
|
#include <net/route.h>
|
||||||
#include "compat_xtables.h"
|
#include "compat_xtables.h"
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
@@ -82,7 +83,11 @@ echo_tg4(struct sk_buff **poldskb, const struct xt_action_param *par)
|
|||||||
if (ip_route_me_harder(&newskb, RTN_UNSPEC) != 0)
|
if (ip_route_me_harder(&newskb, RTN_UNSPEC) != 0)
|
||||||
goto free_nskb;
|
goto free_nskb;
|
||||||
|
|
||||||
newip->ttl = dst_metric(skb_dst(newskb), RTAX_HOPLIMIT);
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
|
||||||
|
newip->ttl = ip4_dst_hoplimit(skb_dst(newskb));
|
||||||
|
#else
|
||||||
|
newip->ttl = dst_metric(skb_dst(newskb), RTAX_HOPLIMIT);
|
||||||
|
#endif
|
||||||
newskb->ip_summed = CHECKSUM_NONE;
|
newskb->ip_summed = CHECKSUM_NONE;
|
||||||
|
|
||||||
/* "Never happens" (?) */
|
/* "Never happens" (?) */
|
||||||
|
Reference in New Issue
Block a user