Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[TCP]: Do not use inet->id of global tcp_socket when sending RST.
[NETFILTER]: Fix undefined references to get_h225_addr
[NETFILTER]: futher {ip,ip6,arp}_tables unification
[NETFILTER]: Fix xt_policy address matching
[NETFILTER]: nf_conntrack: support for layer 3 protocol load on demand
[NETFILTER]: x_tables: set the protocol family in x_tables targets/matches
[NETFILTER]: conntrack: cleanup the conntrack ID initialization
[NETFILTER]: nfnetlink_queue: fix nfnetlink message size
[NETFILTER]: ctnetlink: Fix expectaction mask dumping
[NETFILTER]: Fix Kconfig typos
[NETFILTER]: Fix ip6tables breakage from {get,set}sockopt compat layer
This commit is contained in:
@@ -4,6 +4,62 @@
|
||||
#define XT_FUNCTION_MAXNAMELEN 30
|
||||
#define XT_TABLE_MAXNAMELEN 32
|
||||
|
||||
struct xt_entry_match
|
||||
{
|
||||
union {
|
||||
struct {
|
||||
u_int16_t match_size;
|
||||
|
||||
/* Used by userspace */
|
||||
char name[XT_FUNCTION_MAXNAMELEN-1];
|
||||
|
||||
u_int8_t revision;
|
||||
} user;
|
||||
struct {
|
||||
u_int16_t match_size;
|
||||
|
||||
/* Used inside the kernel */
|
||||
struct xt_match *match;
|
||||
} kernel;
|
||||
|
||||
/* Total length */
|
||||
u_int16_t match_size;
|
||||
} u;
|
||||
|
||||
unsigned char data[0];
|
||||
};
|
||||
|
||||
struct xt_entry_target
|
||||
{
|
||||
union {
|
||||
struct {
|
||||
u_int16_t target_size;
|
||||
|
||||
/* Used by userspace */
|
||||
char name[XT_FUNCTION_MAXNAMELEN-1];
|
||||
|
||||
u_int8_t revision;
|
||||
} user;
|
||||
struct {
|
||||
u_int16_t target_size;
|
||||
|
||||
/* Used inside the kernel */
|
||||
struct xt_target *target;
|
||||
} kernel;
|
||||
|
||||
/* Total length */
|
||||
u_int16_t target_size;
|
||||
} u;
|
||||
|
||||
unsigned char data[0];
|
||||
};
|
||||
|
||||
struct xt_standard_target
|
||||
{
|
||||
struct xt_entry_target target;
|
||||
int verdict;
|
||||
};
|
||||
|
||||
/* The argument to IPT_SO_GET_REVISION_*. Returns highest revision
|
||||
* kernel supports, if >= revision. */
|
||||
struct xt_get_revision
|
||||
@@ -220,10 +276,10 @@ struct xt_table_info
|
||||
char *entries[NR_CPUS];
|
||||
};
|
||||
|
||||
extern int xt_register_target(int af, struct xt_target *target);
|
||||
extern void xt_unregister_target(int af, struct xt_target *target);
|
||||
extern int xt_register_match(int af, struct xt_match *target);
|
||||
extern void xt_unregister_match(int af, struct xt_match *target);
|
||||
extern int xt_register_target(struct xt_target *target);
|
||||
extern void xt_unregister_target(struct xt_target *target);
|
||||
extern int xt_register_match(struct xt_match *target);
|
||||
extern void xt_unregister_match(struct xt_match *target);
|
||||
|
||||
extern int xt_check_match(const struct xt_match *match, unsigned short family,
|
||||
unsigned int size, const char *table, unsigned int hook,
|
||||
|
||||
@@ -65,35 +65,8 @@ struct arpt_arp {
|
||||
u_int16_t invflags;
|
||||
};
|
||||
|
||||
struct arpt_entry_target
|
||||
{
|
||||
union {
|
||||
struct {
|
||||
u_int16_t target_size;
|
||||
|
||||
/* Used by userspace */
|
||||
char name[ARPT_FUNCTION_MAXNAMELEN-1];
|
||||
u_int8_t revision;
|
||||
} user;
|
||||
struct {
|
||||
u_int16_t target_size;
|
||||
|
||||
/* Used inside the kernel */
|
||||
struct arpt_target *target;
|
||||
} kernel;
|
||||
|
||||
/* Total length */
|
||||
u_int16_t target_size;
|
||||
} u;
|
||||
|
||||
unsigned char data[0];
|
||||
};
|
||||
|
||||
struct arpt_standard_target
|
||||
{
|
||||
struct arpt_entry_target target;
|
||||
int verdict;
|
||||
};
|
||||
#define arpt_entry_target xt_entry_target
|
||||
#define arpt_standard_target xt_standard_target
|
||||
|
||||
/* Values for "flag" field in struct arpt_ip (general arp structure).
|
||||
* No flags defined yet.
|
||||
@@ -263,8 +236,10 @@ static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e
|
||||
*/
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define arpt_register_target(tgt) xt_register_target(NF_ARP, tgt)
|
||||
#define arpt_unregister_target(tgt) xt_unregister_target(NF_ARP, tgt)
|
||||
#define arpt_register_target(tgt) \
|
||||
({ (tgt)->family = NF_ARP; \
|
||||
xt_register_target(tgt); })
|
||||
#define arpt_unregister_target(tgt) xt_unregister_target(tgt)
|
||||
|
||||
extern int arpt_register_table(struct arpt_table *table,
|
||||
const struct arpt_replace *repl);
|
||||
|
||||
@@ -52,61 +52,9 @@ struct ipt_ip {
|
||||
u_int8_t invflags;
|
||||
};
|
||||
|
||||
struct ipt_entry_match
|
||||
{
|
||||
union {
|
||||
struct {
|
||||
u_int16_t match_size;
|
||||
|
||||
/* Used by userspace */
|
||||
char name[IPT_FUNCTION_MAXNAMELEN-1];
|
||||
|
||||
u_int8_t revision;
|
||||
} user;
|
||||
struct {
|
||||
u_int16_t match_size;
|
||||
|
||||
/* Used inside the kernel */
|
||||
struct ipt_match *match;
|
||||
} kernel;
|
||||
|
||||
/* Total length */
|
||||
u_int16_t match_size;
|
||||
} u;
|
||||
|
||||
unsigned char data[0];
|
||||
};
|
||||
|
||||
struct ipt_entry_target
|
||||
{
|
||||
union {
|
||||
struct {
|
||||
u_int16_t target_size;
|
||||
|
||||
/* Used by userspace */
|
||||
char name[IPT_FUNCTION_MAXNAMELEN-1];
|
||||
|
||||
u_int8_t revision;
|
||||
} user;
|
||||
struct {
|
||||
u_int16_t target_size;
|
||||
|
||||
/* Used inside the kernel */
|
||||
struct ipt_target *target;
|
||||
} kernel;
|
||||
|
||||
/* Total length */
|
||||
u_int16_t target_size;
|
||||
} u;
|
||||
|
||||
unsigned char data[0];
|
||||
};
|
||||
|
||||
struct ipt_standard_target
|
||||
{
|
||||
struct ipt_entry_target target;
|
||||
int verdict;
|
||||
};
|
||||
#define ipt_entry_match xt_entry_match
|
||||
#define ipt_entry_target xt_entry_target
|
||||
#define ipt_standard_target xt_standard_target
|
||||
|
||||
#define ipt_counters xt_counters
|
||||
|
||||
@@ -321,11 +269,15 @@ ipt_get_target(struct ipt_entry *e)
|
||||
#include <linux/init.h>
|
||||
extern void ipt_init(void) __init;
|
||||
|
||||
#define ipt_register_target(tgt) xt_register_target(AF_INET, tgt)
|
||||
#define ipt_unregister_target(tgt) xt_unregister_target(AF_INET, tgt)
|
||||
#define ipt_register_target(tgt) \
|
||||
({ (tgt)->family = AF_INET; \
|
||||
xt_register_target(tgt); })
|
||||
#define ipt_unregister_target(tgt) xt_unregister_target(tgt)
|
||||
|
||||
#define ipt_register_match(mtch) xt_register_match(AF_INET, mtch)
|
||||
#define ipt_unregister_match(mtch) xt_unregister_match(AF_INET, mtch)
|
||||
#define ipt_register_match(mtch) \
|
||||
({ (mtch)->family = AF_INET; \
|
||||
xt_register_match(mtch); })
|
||||
#define ipt_unregister_match(mtch) xt_unregister_match(mtch)
|
||||
|
||||
//#define ipt_register_table(tbl, repl) xt_register_table(AF_INET, tbl, repl)
|
||||
//#define ipt_unregister_table(tbl) xt_unregister_table(AF_INET, tbl)
|
||||
|
||||
@@ -56,60 +56,9 @@ struct ip6t_ip6 {
|
||||
u_int8_t invflags;
|
||||
};
|
||||
|
||||
/* FIXME: If alignment in kernel different from userspace? --RR */
|
||||
struct ip6t_entry_match
|
||||
{
|
||||
union {
|
||||
struct {
|
||||
u_int16_t match_size;
|
||||
|
||||
/* Used by userspace */
|
||||
char name[IP6T_FUNCTION_MAXNAMELEN-1];
|
||||
u_int8_t revision;
|
||||
} user;
|
||||
struct {
|
||||
u_int16_t match_size;
|
||||
|
||||
/* Used inside the kernel */
|
||||
struct ip6t_match *match;
|
||||
} kernel;
|
||||
|
||||
/* Total length */
|
||||
u_int16_t match_size;
|
||||
} u;
|
||||
|
||||
unsigned char data[0];
|
||||
};
|
||||
|
||||
struct ip6t_entry_target
|
||||
{
|
||||
union {
|
||||
struct {
|
||||
u_int16_t target_size;
|
||||
|
||||
/* Used by userspace */
|
||||
char name[IP6T_FUNCTION_MAXNAMELEN-1];
|
||||
u_int8_t revision;
|
||||
} user;
|
||||
struct {
|
||||
u_int16_t target_size;
|
||||
|
||||
/* Used inside the kernel */
|
||||
struct ip6t_target *target;
|
||||
} kernel;
|
||||
|
||||
/* Total length */
|
||||
u_int16_t target_size;
|
||||
} u;
|
||||
|
||||
unsigned char data[0];
|
||||
};
|
||||
|
||||
struct ip6t_standard_target
|
||||
{
|
||||
struct ip6t_entry_target target;
|
||||
int verdict;
|
||||
};
|
||||
#define ip6t_entry_match xt_entry_match
|
||||
#define ip6t_entry_target xt_entry_target
|
||||
#define ip6t_standard_target xt_standard_target
|
||||
|
||||
#define ip6t_counters xt_counters
|
||||
|
||||
@@ -334,11 +283,15 @@ ip6t_get_target(struct ip6t_entry *e)
|
||||
#include <linux/init.h>
|
||||
extern void ip6t_init(void) __init;
|
||||
|
||||
#define ip6t_register_target(tgt) xt_register_target(AF_INET6, tgt)
|
||||
#define ip6t_unregister_target(tgt) xt_unregister_target(AF_INET6, tgt)
|
||||
#define ip6t_register_target(tgt) \
|
||||
({ (tgt)->family = AF_INET6; \
|
||||
xt_register_target(tgt); })
|
||||
#define ip6t_unregister_target(tgt) xt_unregister_target(tgt)
|
||||
|
||||
#define ip6t_register_match(match) xt_register_match(AF_INET6, match)
|
||||
#define ip6t_unregister_match(match) xt_unregister_match(AF_INET6, match)
|
||||
#define ip6t_register_match(match) \
|
||||
({ (match)->family = AF_INET6; \
|
||||
xt_register_match(match); })
|
||||
#define ip6t_unregister_match(match) xt_unregister_match(match)
|
||||
|
||||
extern int ip6t_register_table(struct ip6t_table *table,
|
||||
const struct ip6t_replace *repl);
|
||||
|
||||
Reference in New Issue
Block a user