Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/kaber/nf-next-2.6
  • Loading branch information
davem330 committed Oct 21, 2010
2 parents a5190b4 + 3b1a1ce commit 9941fb6
Show file tree
Hide file tree
Showing 78 changed files with 4,226 additions and 1,929 deletions.
4 changes: 4 additions & 0 deletions include/linux/in6.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ struct in6_flowlabel_req {
/* RFC5082: Generalized Ttl Security Mechanism */
#define IPV6_MINHOPCOUNT 73

#define IPV6_ORIGDSTADDR 74
#define IPV6_RECVORIGDSTADDR IPV6_ORIGDSTADDR
#define IPV6_TRANSPARENT 75

/*
* Multicast Routing:
* see include/linux/mroute6.h.
Expand Down
15 changes: 15 additions & 0 deletions include/linux/ip_vs.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@

/*
* IPVS Connection Flags
* Only flags 0..15 are sent to backup server
*/
#define IP_VS_CONN_F_FWD_MASK 0x0007 /* mask for the fwd methods */
#define IP_VS_CONN_F_MASQ 0x0000 /* masquerading/NAT */
Expand All @@ -88,9 +89,20 @@
#define IP_VS_CONN_F_TEMPLATE 0x1000 /* template, not connection */
#define IP_VS_CONN_F_ONE_PACKET 0x2000 /* forward only one packet */

/* Flags that are not sent to backup server start from bit 16 */
#define IP_VS_CONN_F_NFCT (1 << 16) /* use netfilter conntrack */

/* Connection flags from destination that can be changed by user space */
#define IP_VS_CONN_F_DEST_MASK (IP_VS_CONN_F_FWD_MASK | \
IP_VS_CONN_F_ONE_PACKET | \
IP_VS_CONN_F_NFCT | \
0)

#define IP_VS_SCHEDNAME_MAXLEN 16
#define IP_VS_PENAME_MAXLEN 16
#define IP_VS_IFNAME_MAXLEN 16

#define IP_VS_PEDATA_MAXLEN 255

/*
* The struct ip_vs_service_user and struct ip_vs_dest_user are
Expand Down Expand Up @@ -324,6 +336,9 @@ enum {
IPVS_SVC_ATTR_NETMASK, /* persistent netmask */

IPVS_SVC_ATTR_STATS, /* nested attribute for service stats */

IPVS_SVC_ATTR_PE_NAME, /* name of ct retriever */

__IPVS_SVC_ATTR_MAX,
};

Expand Down
4 changes: 3 additions & 1 deletion include/linux/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,9 @@ struct ipv6_pinfo {
odstopts:1,
rxflow:1,
rxtclass:1,
rxpmtu:1;
rxpmtu:1,
rxorigdstaddr:1;
/* 2 bits hole */
} bits;
__u16 all;
} rxopt;
Expand Down
6 changes: 6 additions & 0 deletions include/linux/netfilter/nf_conntrack_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,14 @@ enum ip_conntrack_events {

enum ip_conntrack_expect_events {
IPEXP_NEW, /* new expectation */
IPEXP_DESTROY, /* destroyed expectation */
};

/* expectation flags */
#define NF_CT_EXPECT_PERMANENT 0x1
#define NF_CT_EXPECT_INACTIVE 0x2
#define NF_CT_EXPECT_USERSPACE 0x4

#ifdef __KERNEL__
struct ip_conntrack_stat {
unsigned int searched;
Expand Down
1 change: 1 addition & 0 deletions include/linux/netfilter/nf_conntrack_sip.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ enum sip_header_types {
SIP_HDR_VIA_TCP,
SIP_HDR_EXPIRES,
SIP_HDR_CONTENT_LENGTH,
SIP_HDR_CALL_ID,
};

enum sdp_header_types {
Expand Down
1 change: 1 addition & 0 deletions include/linux/netfilter/nfnetlink_conntrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ enum ctattr_expect {
CTA_EXPECT_ID,
CTA_EXPECT_HELP_NAME,
CTA_EXPECT_ZONE,
CTA_EXPECT_FLAGS,
__CTA_EXPECT_MAX
};
#define CTA_EXPECT_MAX (__CTA_EXPECT_MAX - 1)
Expand Down
5 changes: 5 additions & 0 deletions include/linux/netfilter/x_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ struct xt_standard_target {
int verdict;
};

struct xt_error_target {
struct xt_entry_target target;
char errorname[XT_FUNCTION_MAXNAMELEN];
};

/* The argument to IPT_SO_GET_REVISION_*. Returns highest revision
* kernel supports, if >= revision. */
struct xt_get_revision {
Expand Down
13 changes: 10 additions & 3 deletions include/linux/netfilter/xt_TPROXY.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _XT_TPROXY_H_target
#define _XT_TPROXY_H_target
#ifndef _XT_TPROXY_H
#define _XT_TPROXY_H

/* TPROXY target is capable of marking the packet to perform
* redirection. We can get rid of that whenever we get support for
Expand All @@ -11,4 +11,11 @@ struct xt_tproxy_target_info {
__be16 lport;
};

#endif /* _XT_TPROXY_H_target */
struct xt_tproxy_target_info_v1 {
u_int32_t mark_mask;
u_int32_t mark_value;
union nf_inet_addr laddr;
__be16 lport;
};

#endif /* _XT_TPROXY_H */
68 changes: 24 additions & 44 deletions include/linux/netfilter_arp/arp_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,21 @@

#include <linux/netfilter/x_tables.h>

#ifndef __KERNEL__
#define ARPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
#define ARPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
#define arpt_entry_target xt_entry_target
#define arpt_standard_target xt_standard_target
#define arpt_error_target xt_error_target
#define ARPT_CONTINUE XT_CONTINUE
#define ARPT_RETURN XT_RETURN
#define arpt_counters_info xt_counters_info
#define arpt_counters xt_counters
#define ARPT_STANDARD_TARGET XT_STANDARD_TARGET
#define ARPT_ERROR_TARGET XT_ERROR_TARGET
#define ARPT_ENTRY_ITERATE(entries, size, fn, args...) \
XT_ENTRY_ITERATE(struct arpt_entry, entries, size, fn, ## args)
#endif

#define ARPT_DEV_ADDR_LEN_MAX 16

Expand Down Expand Up @@ -63,9 +76,6 @@ struct arpt_arp {
u_int16_t invflags;
};

#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.
*/
Expand Down Expand Up @@ -125,16 +135,10 @@ struct arpt_entry
#define ARPT_SO_GET_REVISION_TARGET (ARPT_BASE_CTL + 3)
#define ARPT_SO_GET_MAX (ARPT_SO_GET_REVISION_TARGET)

/* CONTINUE verdict for targets */
#define ARPT_CONTINUE XT_CONTINUE

/* For standard target */
#define ARPT_RETURN XT_RETURN

/* The argument to ARPT_SO_GET_INFO */
struct arpt_getinfo {
/* Which table: caller fills this in. */
char name[ARPT_TABLE_MAXNAMELEN];
char name[XT_TABLE_MAXNAMELEN];

/* Kernel fills these in. */
/* Which hook entry points are valid: bitmask */
Expand All @@ -156,7 +160,7 @@ struct arpt_getinfo {
/* The argument to ARPT_SO_SET_REPLACE. */
struct arpt_replace {
/* Which table. */
char name[ARPT_TABLE_MAXNAMELEN];
char name[XT_TABLE_MAXNAMELEN];

/* Which hook entry points are valid: bitmask. You can't
change this. */
Expand Down Expand Up @@ -184,14 +188,10 @@ struct arpt_replace {
struct arpt_entry entries[0];
};

/* The argument to ARPT_SO_ADD_COUNTERS. */
#define arpt_counters_info xt_counters_info
#define arpt_counters xt_counters

/* The argument to ARPT_SO_GET_ENTRIES. */
struct arpt_get_entries {
/* Which table: user fills this in. */
char name[ARPT_TABLE_MAXNAMELEN];
char name[XT_TABLE_MAXNAMELEN];

/* User fills this in: total entry size. */
unsigned int size;
Expand All @@ -200,23 +200,12 @@ struct arpt_get_entries {
struct arpt_entry entrytable[0];
};

/* Standard return verdict, or do jump. */
#define ARPT_STANDARD_TARGET XT_STANDARD_TARGET
/* Error verdict. */
#define ARPT_ERROR_TARGET XT_ERROR_TARGET

/* Helper functions */
static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e)
static __inline__ struct xt_entry_target *arpt_get_target(struct arpt_entry *e)
{
return (void *)e + e->target_offset;
}

#ifndef __KERNEL__
/* fn returns 0 to continue iteration */
#define ARPT_ENTRY_ITERATE(entries, size, fn, args...) \
XT_ENTRY_ITERATE(struct arpt_entry, entries, size, fn, ## args)
#endif

/*
* Main firewall chains definitions and global var's definitions.
*/
Expand All @@ -225,17 +214,12 @@ static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e
/* Standard entry. */
struct arpt_standard {
struct arpt_entry entry;
struct arpt_standard_target target;
};

struct arpt_error_target {
struct arpt_entry_target target;
char errorname[ARPT_FUNCTION_MAXNAMELEN];
struct xt_standard_target target;
};

struct arpt_error {
struct arpt_entry entry;
struct arpt_error_target target;
struct xt_error_target target;
};

#define ARPT_ENTRY_INIT(__size) \
Expand All @@ -247,16 +231,16 @@ struct arpt_error {
#define ARPT_STANDARD_INIT(__verdict) \
{ \
.entry = ARPT_ENTRY_INIT(sizeof(struct arpt_standard)), \
.target = XT_TARGET_INIT(ARPT_STANDARD_TARGET, \
sizeof(struct arpt_standard_target)), \
.target = XT_TARGET_INIT(XT_STANDARD_TARGET, \
sizeof(struct xt_standard_target)), \
.target.verdict = -(__verdict) - 1, \
}

#define ARPT_ERROR_INIT \
{ \
.entry = ARPT_ENTRY_INIT(sizeof(struct arpt_error)), \
.target = XT_TARGET_INIT(ARPT_ERROR_TARGET, \
sizeof(struct arpt_error_target)), \
.target = XT_TARGET_INIT(XT_ERROR_TARGET, \
sizeof(struct xt_error_target)), \
.target.errorname = "ERROR", \
}

Expand All @@ -271,8 +255,6 @@ extern unsigned int arpt_do_table(struct sk_buff *skb,
const struct net_device *out,
struct xt_table *table);

#define ARPT_ALIGN(s) XT_ALIGN(s)

#ifdef CONFIG_COMPAT
#include <net/compat.h>

Expand All @@ -285,14 +267,12 @@ struct compat_arpt_entry {
unsigned char elems[0];
};

static inline struct arpt_entry_target *
static inline struct xt_entry_target *
compat_arpt_get_target(struct compat_arpt_entry *e)
{
return (void *)e + e->target_offset;
}

#define COMPAT_ARPT_ALIGN(s) COMPAT_XT_ALIGN(s)

#endif /* CONFIG_COMPAT */
#endif /*__KERNEL__*/
#endif /* _ARPTABLES_H */
2 changes: 2 additions & 0 deletions include/linux/netfilter_bridge/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ header-y += ebt_among.h
header-y += ebt_arp.h
header-y += ebt_arpreply.h
header-y += ebt_ip.h
header-y += ebt_ip6.h
header-y += ebt_limit.h
header-y += ebt_log.h
header-y += ebt_mark_m.h
header-y += ebt_mark_t.h
header-y += ebt_nat.h
header-y += ebt_nflog.h
header-y += ebt_pkttype.h
header-y += ebt_redirect.h
header-y += ebt_stp.h
Expand Down
Loading

0 comments on commit 9941fb6

Please sign in to comment.