Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236849
b: refs/heads/master
c: d956798
h: refs/heads/master
i:
  236847: 4684055
v: v3
  • Loading branch information
Jozsef Kadlecsik authored and Patrick McHardy committed Feb 1, 2011
1 parent d8e15d0 commit 0468bc1
Show file tree
Hide file tree
Showing 5 changed files with 428 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f830837f0eed0f9e371b8fd65169365780814bb1
refs/heads/master: d956798d82d2d331c031301965d69e17a1a48a2b
55 changes: 55 additions & 0 deletions trunk/include/linux/netfilter/xt_set.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#ifndef _XT_SET_H
#define _XT_SET_H

#include <linux/netfilter/ipset/ip_set.h>

/* Revision 0 interface: backward compatible with netfilter/iptables */

/*
* Option flags for kernel operations (xt_set_info_v0)
*/
#define IPSET_SRC 0x01 /* Source match/add */
#define IPSET_DST 0x02 /* Destination match/add */
#define IPSET_MATCH_INV 0x04 /* Inverse matching */

struct xt_set_info_v0 {
ip_set_id_t index;
union {
__u32 flags[IPSET_DIM_MAX + 1];
struct {
__u32 __flags[IPSET_DIM_MAX];
__u8 dim;
__u8 flags;
} compat;
} u;
};

/* match and target infos */
struct xt_set_info_match_v0 {
struct xt_set_info_v0 match_set;
};

struct xt_set_info_target_v0 {
struct xt_set_info_v0 add_set;
struct xt_set_info_v0 del_set;
};

/* Revision 1: current interface to netfilter/iptables */

struct xt_set_info {
ip_set_id_t index;
__u8 dim;
__u8 flags;
};

/* match and target infos */
struct xt_set_info_match {
struct xt_set_info match_set;
};

struct xt_set_info_target {
struct xt_set_info add_set;
struct xt_set_info del_set;
};

#endif /*_XT_SET_H*/
12 changes: 12 additions & 0 deletions trunk/net/netfilter/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,18 @@ config NETFILTER_XT_CONNMARK
ctmark), similarly to the packet mark (nfmark). Using this
target and match, you can set and match on this mark.

config NETFILTER_XT_SET
tristate 'set target and match support'
depends on IP_SET
depends on NETFILTER_ADVANCED
help
This option adds the "SET" target and "set" match.

Using this target and match, you can add/delete and match
elements in the sets created by ipset(8).

To compile it as a module, choose M here. If unsure, say N.

# alphabetically ordered list of targets

comment "Xtables targets"
Expand Down
1 change: 1 addition & 0 deletions trunk/net/netfilter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ obj-$(CONFIG_NETFILTER_XTABLES) += x_tables.o xt_tcpudp.o
# combos
obj-$(CONFIG_NETFILTER_XT_MARK) += xt_mark.o
obj-$(CONFIG_NETFILTER_XT_CONNMARK) += xt_connmark.o
obj-$(CONFIG_NETFILTER_XT_SET) += xt_set.o

# targets
obj-$(CONFIG_NETFILTER_XT_TARGET_AUDIT) += xt_AUDIT.o
Expand Down
Loading

0 comments on commit 0468bc1

Please sign in to comment.