mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
[NETFILTER]: x_tables: replace IPv4/IPv6 policy match by address family independant version
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
f2ffd9eeda
commit
c4b8851392
@@ -126,6 +126,8 @@ struct xt_match
|
||||
unsigned int matchsize;
|
||||
unsigned int hooks;
|
||||
unsigned short proto;
|
||||
|
||||
unsigned short family;
|
||||
u_int8_t revision;
|
||||
};
|
||||
|
||||
@@ -169,6 +171,8 @@ struct xt_target
|
||||
unsigned int targetsize;
|
||||
unsigned int hooks;
|
||||
unsigned short proto;
|
||||
|
||||
unsigned short family;
|
||||
u_int8_t revision;
|
||||
};
|
||||
|
||||
|
||||
58
include/linux/netfilter/xt_policy.h
Normal file
58
include/linux/netfilter/xt_policy.h
Normal file
@@ -0,0 +1,58 @@
|
||||
#ifndef _XT_POLICY_H
|
||||
#define _XT_POLICY_H
|
||||
|
||||
#define XT_POLICY_MAX_ELEM 4
|
||||
|
||||
enum xt_policy_flags
|
||||
{
|
||||
XT_POLICY_MATCH_IN = 0x1,
|
||||
XT_POLICY_MATCH_OUT = 0x2,
|
||||
XT_POLICY_MATCH_NONE = 0x4,
|
||||
XT_POLICY_MATCH_STRICT = 0x8,
|
||||
};
|
||||
|
||||
enum xt_policy_modes
|
||||
{
|
||||
XT_POLICY_MODE_TRANSPORT,
|
||||
XT_POLICY_MODE_TUNNEL
|
||||
};
|
||||
|
||||
struct xt_policy_spec
|
||||
{
|
||||
u_int8_t saddr:1,
|
||||
daddr:1,
|
||||
proto:1,
|
||||
mode:1,
|
||||
spi:1,
|
||||
reqid:1;
|
||||
};
|
||||
|
||||
union xt_policy_addr
|
||||
{
|
||||
struct in_addr a4;
|
||||
struct in6_addr a6;
|
||||
};
|
||||
|
||||
struct xt_policy_elem
|
||||
{
|
||||
union xt_policy_addr saddr;
|
||||
union xt_policy_addr smask;
|
||||
union xt_policy_addr daddr;
|
||||
union xt_policy_addr dmask;
|
||||
u_int32_t spi;
|
||||
u_int32_t reqid;
|
||||
u_int8_t proto;
|
||||
u_int8_t mode;
|
||||
|
||||
struct xt_policy_spec match;
|
||||
struct xt_policy_spec invert;
|
||||
};
|
||||
|
||||
struct xt_policy_info
|
||||
{
|
||||
struct xt_policy_elem pol[XT_POLICY_MAX_ELEM];
|
||||
u_int16_t flags;
|
||||
u_int16_t len;
|
||||
};
|
||||
|
||||
#endif /* _XT_POLICY_H */
|
||||
Reference in New Issue
Block a user