mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 13:15:12 +02:00
Add a compat wrapper to make modules work with older Linux.
The extension modules use the API of a fairly recent kernel, if not even the networking git tree. To make it work with older Linux kernels, an API wrapper is added. Should compile against running-kernels Linux 2.6.19..current (tested: 2.6.22..current). Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
This commit is contained in:
@@ -17,11 +17,6 @@
|
||||
#include <net/ip.h>
|
||||
#include <net/route.h>
|
||||
#include <linux/netfilter/x_tables.h>
|
||||
#ifdef CONFIG_NETFILTER_XT_TARGET_TEE
|
||||
# include <linux/netfilter/xt_TEE.h>
|
||||
#else
|
||||
# include "xt_TEE.h"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
||||
# define WITH_CONNTRACK 1
|
||||
@@ -29,6 +24,9 @@
|
||||
static struct nf_conn tee_track;
|
||||
#endif
|
||||
|
||||
#include "compat_xtables.h"
|
||||
#include "xt_TEE.h"
|
||||
|
||||
static const union nf_inet_addr zero_address;
|
||||
|
||||
/*
|
||||
@@ -101,7 +99,8 @@ static void tee_ip_direct_send(struct sk_buff *skb)
|
||||
unsigned int hh_len = LL_RESERVED_SPACE(dev);
|
||||
|
||||
/* Be paranoid, rather than too clever. */
|
||||
if (unlikely(skb_headroom(skb) < hh_len && dev->header_ops != NULL)) {
|
||||
if (unlikely(skb_headroom(skb) < hh_len)) {
|
||||
/* if (dev->header_ops != NULL) */
|
||||
struct sk_buff *skb2;
|
||||
|
||||
skb2 = skb_realloc_headroom(skb, LL_RESERVED_SPACE(dev));
|
||||
|
Reference in New Issue
Block a user