netfilter: xtables: add device group match

Add a new 'devgroup' match to match on the device group of the
incoming and outgoing network device of a packet.

Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Patrick McHardy
2011-02-03 00:05:43 +01:00
parent 5f52bc3cdd
commit 9291747f11
5 changed files with 114 additions and 0 deletions

View File

@ -37,6 +37,7 @@ header-y += xt_connmark.h
header-y += xt_conntrack.h
header-y += xt_cpu.h
header-y += xt_dccp.h
header-y += xt_devgroup.h
header-y += xt_dscp.h
header-y += xt_esp.h
header-y += xt_hashlimit.h

View File

@ -0,0 +1,21 @@
#ifndef _XT_DEVGROUP_H
#define _XT_DEVGROUP_H
#include <linux/types.h>
enum xt_devgroup_flags {
XT_DEVGROUP_MATCH_SRC = 0x1,
XT_DEVGROUP_INVERT_SRC = 0x2,
XT_DEVGROUP_MATCH_DST = 0x4,
XT_DEVGROUP_INVERT_DST = 0x8,
};
struct xt_devgroup_info {
__u32 flags;
__u32 src_group;
__u32 src_mask;
__u32 dst_group;
__u32 dst_mask;
};
#endif /* _XT_DEVGROUP_H */