mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 21:25:12 +02:00
Support for Linux 2.6.17
This commit is contained in:
8
INSTALL
8
INSTALL
@@ -12,13 +12,9 @@ in combination with the kernel's Kbuild system.
|
|||||||
Prerequirements
|
Prerequirements
|
||||||
===============
|
===============
|
||||||
|
|
||||||
* a recent iptables snapshot
|
* iptables 1.4.1
|
||||||
- from the "xtables" git repository at dev.medozas.de
|
|
||||||
(minimum as per git-describe: v1.4.0-77)
|
|
||||||
- or the subversion repository at netfilter.org (minimum: r7502)
|
|
||||||
- or the xtables-combined tarball that is currently distributed
|
|
||||||
|
|
||||||
* kernel-source >= 2.6.18.5 with prepared build/output directory
|
* kernel-source >= 2.6.17 with prepared build/output directory
|
||||||
- CONFIG_NF_CONNTRACK or CONFIG_IP_NF_CONNTRACK
|
- CONFIG_NF_CONNTRACK or CONFIG_IP_NF_CONNTRACK
|
||||||
- CONFIG_NF_CONNTRACK_MARK or CONFIG_IP_NF_CONNTRACK_MARK
|
- CONFIG_NF_CONNTRACK_MARK or CONFIG_IP_NF_CONNTRACK_MARK
|
||||||
enabled =y or as module (=m)
|
enabled =y or as module (=m)
|
||||||
|
1
extensions/.gitignore
vendored
1
extensions/.gitignore
vendored
@@ -4,6 +4,7 @@
|
|||||||
*.ko
|
*.ko
|
||||||
*.mod.c
|
*.mod.c
|
||||||
Module.symvers
|
Module.symvers
|
||||||
|
Modules.symvers
|
||||||
modules.order
|
modules.order
|
||||||
|
|
||||||
/*.so
|
/*.so
|
||||||
|
@@ -408,4 +408,12 @@ void xtnu_csum_replace2(__sum16 *sum, __be16 from, __be16 to)
|
|||||||
EXPORT_SYMBOL_GPL(xtnu_csum_replace2);
|
EXPORT_SYMBOL_GPL(xtnu_csum_replace2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 17)
|
||||||
|
int xtnu_skb_linearize(struct sk_buff *skb)
|
||||||
|
{
|
||||||
|
return skb_linearize(skb, GFP_ATOMIC);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(xtnu_skb_linearize);
|
||||||
|
#endif
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
@@ -5,8 +5,8 @@
|
|||||||
#include "compat_skbuff.h"
|
#include "compat_skbuff.h"
|
||||||
#include "compat_xtnu.h"
|
#include "compat_xtnu.h"
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 17)
|
||||||
# warning Kernels below 2.6.18.5 not supported.
|
# warning Kernels below 2.6.17 not supported.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
||||||
@@ -26,6 +26,11 @@
|
|||||||
# warning You need either CONFIG_NF_CONNTRACK or CONFIG_IP_NF_CONNTRACK.
|
# warning You need either CONFIG_NF_CONNTRACK or CONFIG_IP_NF_CONNTRACK.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 17)
|
||||||
|
# define skb_init_secmark(skb)
|
||||||
|
# define skb_linearize xtnu_skb_linearize
|
||||||
|
#endif
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19)
|
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19)
|
||||||
# define neigh_hh_output xtnu_neigh_hh_output
|
# define neigh_hh_output xtnu_neigh_hh_output
|
||||||
# define IPPROTO_UDPLITE 136
|
# define IPPROTO_UDPLITE 136
|
||||||
|
@@ -83,5 +83,6 @@ extern struct xt_match *xtnu_request_find_match(unsigned int,
|
|||||||
const char *, uint8_t);
|
const char *, uint8_t);
|
||||||
extern int xtnu_neigh_hh_output(struct hh_cache *, struct sk_buff *);
|
extern int xtnu_neigh_hh_output(struct hh_cache *, struct sk_buff *);
|
||||||
extern void xtnu_csum_replace2(__u16 __bitwise *, __be16, __be16);
|
extern void xtnu_csum_replace2(__u16 __bitwise *, __be16, __be16);
|
||||||
|
extern int xtnu_skb_linearize(struct sk_buff *);
|
||||||
|
|
||||||
#endif /* _COMPAT_XTNU_H */
|
#endif /* _COMPAT_XTNU_H */
|
||||||
|
@@ -52,7 +52,7 @@
|
|||||||
static void tarpit_tcp(struct sk_buff *oldskb, unsigned int hook)
|
static void tarpit_tcp(struct sk_buff *oldskb, unsigned int hook)
|
||||||
{
|
{
|
||||||
struct tcphdr _otcph, *oth, *tcph;
|
struct tcphdr _otcph, *oth, *tcph;
|
||||||
unsigned int addr_type;
|
unsigned int addr_type = RTN_UNSPEC;
|
||||||
struct sk_buff *nskb;
|
struct sk_buff *nskb;
|
||||||
struct iphdr *niph;
|
struct iphdr *niph;
|
||||||
u_int16_t tmp;
|
u_int16_t tmp;
|
||||||
@@ -96,9 +96,11 @@ static void tarpit_tcp(struct sk_buff *oldskb, unsigned int hook)
|
|||||||
skb_nfmark(nskb) = 0;
|
skb_nfmark(nskb) = 0;
|
||||||
skb_init_secmark(nskb);
|
skb_init_secmark(nskb);
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18)
|
||||||
skb_shinfo(nskb)->gso_size = 0;
|
skb_shinfo(nskb)->gso_size = 0;
|
||||||
skb_shinfo(nskb)->gso_segs = 0;
|
skb_shinfo(nskb)->gso_segs = 0;
|
||||||
skb_shinfo(nskb)->gso_type = 0;
|
skb_shinfo(nskb)->gso_type = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
tcph = (struct tcphdr *)(skb_network_header(nskb) + ip_hdrlen(nskb));
|
tcph = (struct tcphdr *)(skb_network_header(nskb) + ip_hdrlen(nskb));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user