mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-06 04:35:12 +02:00
build: support for Linux 3.5
This commit is contained in:
@@ -5,6 +5,8 @@ Fixes:
|
|||||||
- xt_psd: avoid crash due to curr->next corruption
|
- xt_psd: avoid crash due to curr->next corruption
|
||||||
Changes:
|
Changes:
|
||||||
- xt_psd: reject invalid match options
|
- xt_psd: reject invalid match options
|
||||||
|
Enhancements:
|
||||||
|
- Support for Linux 3.5
|
||||||
|
|
||||||
|
|
||||||
v1.42 (2012-04-05)
|
v1.42 (2012-04-05)
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
#include <linux/netfilter_ipv4.h>
|
#include <linux/netfilter_ipv4.h>
|
||||||
#include <linux/netfilter/x_tables.h>
|
#include <linux/netfilter/x_tables.h>
|
||||||
|
#include <linux/netfilter_ipv6/ip6_tables.h>
|
||||||
#include <linux/netfilter_arp.h>
|
#include <linux/netfilter_arp.h>
|
||||||
#include <net/ip.h>
|
#include <net/ip.h>
|
||||||
#include <net/route.h>
|
#include <net/route.h>
|
||||||
@@ -612,4 +613,12 @@ void *HX_memmem(const void *space, size_t spacesize,
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(HX_memmem);
|
EXPORT_SYMBOL_GPL(HX_memmem);
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0)
|
||||||
|
int xtnu_ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
|
||||||
|
int target, unsigned short *fragoff, int *fragflg)
|
||||||
|
{
|
||||||
|
return ipv6_find_hdr(skb, offset, target, fragoff);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
@@ -119,6 +119,10 @@
|
|||||||
# define NIPQUAD_FMT "%u.%u.%u.%u"
|
# define NIPQUAD_FMT "%u.%u.%u.%u"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 5, 0)
|
||||||
|
# define ipv6_find_hdr xtnu_ipv6_find_hdr
|
||||||
|
#endif
|
||||||
|
|
||||||
#define ip_route_me_harder xtnu_ip_route_me_harder
|
#define ip_route_me_harder xtnu_ip_route_me_harder
|
||||||
#define skb_make_writable xtnu_skb_make_writable
|
#define skb_make_writable xtnu_skb_make_writable
|
||||||
#define xt_target xtnu_target
|
#define xt_target xtnu_target
|
||||||
|
@@ -162,6 +162,8 @@ extern void xtnu_csum_replace4(__u16 __bitwise *, __be32, __be32);
|
|||||||
extern void xtnu_proto_csum_replace4(__u16 __bitwise *, struct sk_buff *,
|
extern void xtnu_proto_csum_replace4(__u16 __bitwise *, struct sk_buff *,
|
||||||
__be32, __be32, bool);
|
__be32, __be32, bool);
|
||||||
extern int xtnu_skb_linearize(struct sk_buff *);
|
extern int xtnu_skb_linearize(struct sk_buff *);
|
||||||
|
extern int xtnu_ipv6_find_hdr(const struct sk_buff *, unsigned int *,
|
||||||
|
int, unsigned short *, int *);
|
||||||
|
|
||||||
extern void *HX_memmem(const void *, size_t, const void *, size_t);
|
extern void *HX_memmem(const void *, size_t, const void *, size_t);
|
||||||
|
|
||||||
|
@@ -181,7 +181,7 @@ static bool rawnat6_prepare_l4(struct sk_buff **pskb, unsigned int *l4offset,
|
|||||||
*l4proto = NEXTHDR_MAX;
|
*l4proto = NEXTHDR_MAX;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(types); ++i) {
|
for (i = 0; i < ARRAY_SIZE(types); ++i) {
|
||||||
err = ipv6_find_hdr(*pskb, l4offset, types[i], NULL);
|
err = ipv6_find_hdr(*pskb, l4offset, types[i], NULL, NULL);
|
||||||
if (err >= 0) {
|
if (err >= 0) {
|
||||||
*l4proto = types[i];
|
*l4proto = types[i];
|
||||||
break;
|
break;
|
||||||
|
@@ -247,8 +247,9 @@ sysrq_tg6(struct sk_buff **pskb, const struct xt_action_param *par)
|
|||||||
return NF_DROP;
|
return NF_DROP;
|
||||||
|
|
||||||
iph = ipv6_hdr(skb);
|
iph = ipv6_hdr(skb);
|
||||||
if ((ipv6_find_hdr(skb, &th_off, IPPROTO_UDP, &frag_off) < 0 &&
|
/* Should probably be using %IP6T_FH_F_AUTH */
|
||||||
ipv6_find_hdr(skb, &th_off, IPPROTO_UDPLITE, &frag_off) < 0) ||
|
if ((ipv6_find_hdr(skb, &th_off, IPPROTO_UDP, &frag_off, NULL) < 0 &&
|
||||||
|
ipv6_find_hdr(skb, &th_off, IPPROTO_UDPLITE, &frag_off, NULL) < 0) ||
|
||||||
frag_off > 0)
|
frag_off > 0)
|
||||||
return NF_DROP;
|
return NF_DROP;
|
||||||
|
|
||||||
|
@@ -185,7 +185,7 @@ llayer4_proto(const struct sk_buff *skb, unsigned int *offset, bool *hotdrop)
|
|||||||
int err;
|
int err;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(types); ++i) {
|
for (i = 0; i < ARRAY_SIZE(types); ++i) {
|
||||||
err = ipv6_find_hdr(skb, offset, types[i], NULL);
|
err = ipv6_find_hdr(skb, offset, types[i], NULL, NULL);
|
||||||
if (err >= 0)
|
if (err >= 0)
|
||||||
return types[i];
|
return types[i];
|
||||||
if (err != -ENOENT) {
|
if (err != -ENOENT) {
|
||||||
|
Reference in New Issue
Block a user