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 Mar 24, 2009
2 parents bb4f92b + 1d45209 commit b5bb143
Show file tree
Hide file tree
Showing 71 changed files with 1,626 additions and 784 deletions.
3 changes: 3 additions & 0 deletions drivers/leds/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,7 @@ config LEDS_TRIGGER_DEFAULT_ON
This allows LEDs to be initialised in the ON state.
If unsure, say Y.

comment "iptables trigger is under Netfilter config (LED target)"
depends on LEDS_TRIGGERS

endif # NEW_LEDS
8 changes: 8 additions & 0 deletions include/linux/netfilter/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,21 @@ header-y += xt_CLASSIFY.h
header-y += xt_CONNMARK.h
header-y += xt_CONNSECMARK.h
header-y += xt_DSCP.h
header-y += xt_LED.h
header-y += xt_MARK.h
header-y += xt_NFLOG.h
header-y += xt_NFQUEUE.h
header-y += xt_RATEEST.h
header-y += xt_SECMARK.h
header-y += xt_TCPMSS.h
header-y += xt_TCPOPTSTRIP.h
header-y += xt_TPROXY.h
header-y += xt_comment.h
header-y += xt_connbytes.h
header-y += xt_connlimit.h
header-y += xt_connmark.h
header-y += xt_conntrack.h
header-y += xt_cluster.h
header-y += xt_dccp.h
header-y += xt_dscp.h
header-y += xt_esp.h
Expand All @@ -30,6 +35,7 @@ header-y += xt_mark.h
header-y += xt_multiport.h
header-y += xt_owner.h
header-y += xt_pkttype.h
header-y += xt_quota.h
header-y += xt_rateest.h
header-y += xt_realm.h
header-y += xt_recent.h
Expand All @@ -39,6 +45,8 @@ header-y += xt_statistic.h
header-y += xt_string.h
header-y += xt_tcpmss.h
header-y += xt_tcpudp.h
header-y += xt_time.h
header-y += xt_u32.h

unifdef-y += nf_conntrack_common.h
unifdef-y += nf_conntrack_ftp.h
Expand Down
1 change: 1 addition & 0 deletions include/linux/netfilter/nfnetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);
extern int nfnetlink_has_listeners(unsigned int group);
extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group,
int echo);
extern void nfnetlink_set_err(u32 pid, u32 group, int error);
extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags);

extern void nfnl_lock(void);
Expand Down
15 changes: 8 additions & 7 deletions include/linux/netfilter/x_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,23 +349,22 @@ struct xt_table
{
struct list_head list;

/* A unique name... */
const char name[XT_TABLE_MAXNAMELEN];

/* What hooks you will enter on */
unsigned int valid_hooks;

/* Lock for the curtain */
rwlock_t lock;
struct mutex lock;

/* Man behind the curtain... */
//struct ip6t_table_info *private;
void *private;
struct xt_table_info *private;

/* Set this to THIS_MODULE if you are a module, otherwise NULL */
struct module *me;

u_int8_t af; /* address/protocol family */

/* A unique name... */
const char name[XT_TABLE_MAXNAMELEN];
};

#include <linux/netfilter_ipv4.h>
Expand All @@ -386,7 +385,7 @@ struct xt_table_info

/* ipt_entry tables: one per CPU */
/* Note : this field MUST be the last one, see XT_TABLE_INFO_SZ */
char *entries[1];
void *entries[1];
};

#define XT_TABLE_INFO_SZ (offsetof(struct xt_table_info, entries) \
Expand Down Expand Up @@ -433,6 +432,8 @@ extern void xt_proto_fini(struct net *net, u_int8_t af);

extern struct xt_table_info *xt_alloc_table_info(unsigned int size);
extern void xt_free_table_info(struct xt_table_info *info);
extern void xt_table_entry_swap_rcu(struct xt_table_info *old,
struct xt_table_info *new);

#ifdef CONFIG_COMPAT
#include <net/compat.h>
Expand Down
13 changes: 13 additions & 0 deletions include/linux/netfilter/xt_LED.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef _XT_LED_H
#define _XT_LED_H

struct xt_led_info {
char id[27]; /* Unique ID for this trigger in the LED class */
__u8 always_blink; /* Blink even if the LED is already on */
__u32 delay; /* Delay until LED is switched off after trigger */

/* Kernel data used in the module */
void *internal_data __attribute__((aligned(8)));
};

#endif /* _XT_LED_H */
15 changes: 15 additions & 0 deletions include/linux/netfilter/xt_cluster.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef _XT_CLUSTER_MATCH_H
#define _XT_CLUSTER_MATCH_H

enum xt_cluster_flags {
XT_CLUSTER_F_INV = (1 << 0)
};

struct xt_cluster_match_info {
u_int32_t total_nodes;
u_int32_t node_mask;
u_int32_t hash_seed;
u_int32_t flags;
};

#endif /* _XT_CLUSTER_MATCH_H */
9 changes: 5 additions & 4 deletions include/linux/netfilter/xt_limit.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@
/* timings are in milliseconds. */
#define XT_LIMIT_SCALE 10000

struct xt_limit_priv;

/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490
seconds, or one every 59 hours. */
struct xt_rateinfo {
u_int32_t avg; /* Average secs between packets * scale */
u_int32_t burst; /* Period multiplier for upper limit. */

/* Used internally by the kernel */
unsigned long prev;
u_int32_t credit;
unsigned long prev; /* moved to xt_limit_priv */
u_int32_t credit; /* moved to xt_limit_priv */
u_int32_t credit_cap, cost;

/* Ugly, ugly fucker. */
struct xt_rateinfo *master;
struct xt_limit_priv *master;
};
#endif /*_XT_RATE_H*/
4 changes: 3 additions & 1 deletion include/linux/netfilter/xt_quota.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ enum xt_quota_flags {
};
#define XT_QUOTA_MASK 0x1

struct xt_quota_priv;

struct xt_quota_info {
u_int32_t flags;
u_int32_t pad;

/* Used internally by the kernel */
aligned_u64 quota;
struct xt_quota_info *master;
struct xt_quota_priv *master;
};

#endif /* _XT_QUOTA_H */
7 changes: 4 additions & 3 deletions include/linux/netfilter/xt_statistic.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ enum xt_statistic_flags {
};
#define XT_STATISTIC_MASK 0x1

struct xt_statistic_priv;

struct xt_statistic_info {
u_int16_t mode;
u_int16_t flags;
Expand All @@ -23,11 +25,10 @@ struct xt_statistic_info {
struct {
u_int32_t every;
u_int32_t packet;
/* Used internally by the kernel */
u_int32_t count;
u_int32_t count; /* unused */
} nth;
} u;
struct xt_statistic_info *master __attribute__((aligned(8)));
struct xt_statistic_priv *master __attribute__((aligned(8)));
};

#endif /* _XT_STATISTIC_H */
1 change: 1 addition & 0 deletions include/linux/netfilter_ipv6/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ header-y += ip6t_length.h
header-y += ip6t_limit.h
header-y += ip6t_mac.h
header-y += ip6t_mark.h
header-y += ip6t_mh.h
header-y += ip6t_multiport.h
header-y += ip6t_opts.h
header-y += ip6t_owner.h
Expand Down
2 changes: 1 addition & 1 deletion include/net/netfilter/nf_conntrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ static inline int nf_ct_is_untracked(const struct sk_buff *skb)

extern int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp);
extern unsigned int nf_conntrack_htable_size;
extern int nf_conntrack_max;
extern unsigned int nf_conntrack_max;

#define NF_CT_STAT_INC(net, count) \
(per_cpu_ptr((net)->ct.stat, raw_smp_processor_id())->count++)
Expand Down
10 changes: 1 addition & 9 deletions include/net/netfilter/nf_conntrack_l4proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,14 @@ struct nf_conntrack_l4proto
struct module *me;
};

/* Existing built-in protocols */
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6;
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4;
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6;
/* Existing built-in generic protocol */
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_generic;

#define MAX_NF_CT_PROTO 256

extern struct nf_conntrack_l4proto *
__nf_ct_l4proto_find(u_int16_t l3proto, u_int8_t l4proto);

extern struct nf_conntrack_l4proto *
nf_ct_l4proto_find_get(u_int16_t l3proto, u_int8_t protocol);

extern void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p);

/* Protocol registration. */
extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto);
extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto);
Expand Down
11 changes: 8 additions & 3 deletions include/net/netfilter/nf_log.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef _NF_LOG_H
#define _NF_LOG_H

#include <linux/netfilter.h>

/* those NF_LOG_* defines and struct nf_loginfo are legacy definitios that will
* disappear once iptables is replaced with pkttables. Please DO NOT use them
* for any new code! */
Expand Down Expand Up @@ -40,12 +42,15 @@ struct nf_logger {
struct module *me;
nf_logfn *logfn;
char *name;
struct list_head list[NFPROTO_NUMPROTO];
};

/* Function to register/unregister log function. */
int nf_log_register(u_int8_t pf, const struct nf_logger *logger);
void nf_log_unregister(const struct nf_logger *logger);
void nf_log_unregister_pf(u_int8_t pf);
int nf_log_register(u_int8_t pf, struct nf_logger *logger);
void nf_log_unregister(struct nf_logger *logger);

int nf_log_bind_pf(u_int8_t pf, const struct nf_logger *logger);
void nf_log_unbind_pf(u_int8_t pf);

/* Calls the registered backend logging function */
void nf_log_packet(u_int8_t pf,
Expand Down
1 change: 0 additions & 1 deletion net/bridge/netfilter/ebtable_broute.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ static struct ebt_table broute_table =
.name = "broute",
.table = &initial_table,
.valid_hooks = 1 << NF_BR_BROUTING,
.lock = __RW_LOCK_UNLOCKED(broute_table.lock),
.check = check,
.me = THIS_MODULE,
};
Expand Down
1 change: 0 additions & 1 deletion net/bridge/netfilter/ebtable_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ static struct ebt_table frame_filter =
.name = "filter",
.table = &initial_table,
.valid_hooks = FILTER_VALID_HOOKS,
.lock = __RW_LOCK_UNLOCKED(frame_filter.lock),
.check = check,
.me = THIS_MODULE,
};
Expand Down
1 change: 0 additions & 1 deletion net/bridge/netfilter/ebtable_nat.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ static struct ebt_table frame_nat =
.name = "nat",
.table = &initial_table,
.valid_hooks = NAT_VALID_HOOKS,
.lock = __RW_LOCK_UNLOCKED(frame_nat.lock),
.check = check,
.me = THIS_MODULE,
};
Expand Down
30 changes: 12 additions & 18 deletions net/ipv4/netfilter/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ config NF_CONNTRACK_PROC_COMPAT
default y
help
This option enables /proc and sysctl compatibility with the old
layer 3 dependant connection tracking. This is needed to keep
layer 3 dependent connection tracking. This is needed to keep
old programs that have not been adapted to the new names working.

If unsure, say Y.
Expand Down Expand Up @@ -95,11 +95,11 @@ config IP_NF_MATCH_ECN
config IP_NF_MATCH_TTL
tristate '"ttl" match support'
depends on NETFILTER_ADVANCED
help
This adds CONFIG_IP_NF_MATCH_TTL option, which enabled the user
to match packets by their TTL value.

To compile it as a module, choose M here. If unsure, say N.
select NETFILTER_XT_MATCH_HL
---help---
This is a backwards-compat option for the user's convenience
(e.g. when running oldconfig). It selects
CONFIG_NETFILTER_XT_MATCH_HL.

# `filter', generic and specific targets
config IP_NF_FILTER
Expand Down Expand Up @@ -323,19 +323,13 @@ config IP_NF_TARGET_ECN
To compile it as a module, choose M here. If unsure, say N.

config IP_NF_TARGET_TTL
tristate 'TTL target support'
depends on IP_NF_MANGLE
tristate '"TTL" target support'
depends on NETFILTER_ADVANCED
help
This option adds a `TTL' target, which enables the user to modify
the TTL value of the IP header.

While it is safe to decrement/lower the TTL, this target also enables
functionality to increment and set the TTL value of the IP header to
arbitrary values. This is EXTREMELY DANGEROUS since you can easily
create immortal packets that loop forever on the network.

To compile it as a module, choose M here. If unsure, say N.
select NETFILTER_XT_TARGET_HL
---help---
This is a backwards-compat option for the user's convenience
(e.g. when running oldconfig). It selects
CONFIG_NETFILTER_XT_TARGET_HL.

# raw + specific targets
config IP_NF_RAW
Expand Down
2 changes: 0 additions & 2 deletions net/ipv4/netfilter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ obj-$(CONFIG_IP_NF_SECURITY) += iptable_security.o
obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o
obj-$(CONFIG_IP_NF_MATCH_AH) += ipt_ah.o
obj-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn.o
obj-$(CONFIG_IP_NF_MATCH_TTL) += ipt_ttl.o

# targets
obj-$(CONFIG_IP_NF_TARGET_CLUSTERIP) += ipt_CLUSTERIP.o
Expand All @@ -61,7 +60,6 @@ obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o
obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o
obj-$(CONFIG_IP_NF_TARGET_TTL) += ipt_TTL.o
obj-$(CONFIG_IP_NF_TARGET_ULOG) += ipt_ULOG.o

# generic ARP tables
Expand Down
Loading

0 comments on commit b5bb143

Please sign in to comment.