diff options
| author | Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> | 2006-04-01 05:22:30 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2006-04-01 05:22:30 -0500 |
| commit | dc5ab2faece3b7473931357db7f63f596678481d (patch) | |
| tree | d1e5fd3e805e7d2c4136459cca17d5f8ed44bfb6 /include/linux | |
| parent | 9606a21635cec077e1928273751b44ecc824a49d (diff) | |
[NETFILTER]: x_tables: unify IPv4/IPv6 esp match
This unifies ipt_esp and ip6t_esp to xt_esp. Please note that now
a user program needs to specify IPPROTO_ESP as protocol to use esp match
with IPv6. This means that ip6tables requires '-p esp' like iptables.
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/netfilter/xt_esp.h | 14 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv4/ipt_esp.h | 14 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv6/ip6t_esp.h | 12 |
3 files changed, 22 insertions, 18 deletions
diff --git a/include/linux/netfilter/xt_esp.h b/include/linux/netfilter/xt_esp.h new file mode 100644 index 0000000000..9380fb1c27 --- /dev/null +++ b/include/linux/netfilter/xt_esp.h | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #ifndef _XT_ESP_H | ||
| 2 | #define _XT_ESP_H | ||
| 3 | |||
| 4 | struct xt_esp | ||
| 5 | { | ||
| 6 | u_int32_t spis[2]; /* Security Parameter Index */ | ||
| 7 | u_int8_t invflags; /* Inverse flags */ | ||
| 8 | }; | ||
| 9 | |||
| 10 | /* Values for "invflags" field in struct xt_esp. */ | ||
| 11 | #define XT_ESP_INV_SPI 0x01 /* Invert the sense of spi. */ | ||
| 12 | #define XT_ESP_INV_MASK 0x01 /* All possible flags. */ | ||
| 13 | |||
| 14 | #endif /*_XT_ESP_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_esp.h b/include/linux/netfilter_ipv4/ipt_esp.h index c782a83e53..78296e7eef 100644 --- a/include/linux/netfilter_ipv4/ipt_esp.h +++ b/include/linux/netfilter_ipv4/ipt_esp.h | |||
| @@ -1,16 +1,10 @@ | |||
| 1 | #ifndef _IPT_ESP_H | 1 | #ifndef _IPT_ESP_H |
| 2 | #define _IPT_ESP_H | 2 | #define _IPT_ESP_H |
| 3 | 3 | ||
| 4 | struct ipt_esp | 4 | #include <linux/netfilter/xt_esp.h> |
| 5 | { | ||
| 6 | u_int32_t spis[2]; /* Security Parameter Index */ | ||
| 7 | u_int8_t invflags; /* Inverse flags */ | ||
| 8 | }; | ||
| 9 | 5 | ||
| 10 | 6 | #define ipt_esp xt_esp | |
| 11 | 7 | #define IPT_ESP_INV_SPI XT_ESP_INV_SPI | |
| 12 | /* Values for "invflags" field in struct ipt_esp. */ | 8 | #define IPT_ESP_INV_MASK XT_ESP_INV_MASK |
| 13 | #define IPT_ESP_INV_SPI 0x01 /* Invert the sense of spi. */ | ||
| 14 | #define IPT_ESP_INV_MASK 0x01 /* All possible flags. */ | ||
| 15 | 9 | ||
| 16 | #endif /*_IPT_ESP_H*/ | 10 | #endif /*_IPT_ESP_H*/ |
diff --git a/include/linux/netfilter_ipv6/ip6t_esp.h b/include/linux/netfilter_ipv6/ip6t_esp.h index a91b6abc80..f62eaf53c1 100644 --- a/include/linux/netfilter_ipv6/ip6t_esp.h +++ b/include/linux/netfilter_ipv6/ip6t_esp.h | |||
| @@ -1,14 +1,10 @@ | |||
| 1 | #ifndef _IP6T_ESP_H | 1 | #ifndef _IP6T_ESP_H |
| 2 | #define _IP6T_ESP_H | 2 | #define _IP6T_ESP_H |
| 3 | 3 | ||
| 4 | struct ip6t_esp | 4 | #include <linux/netfilter/xt_esp.h> |
| 5 | { | ||
| 6 | u_int32_t spis[2]; /* Security Parameter Index */ | ||
| 7 | u_int8_t invflags; /* Inverse flags */ | ||
| 8 | }; | ||
| 9 | 5 | ||
| 10 | /* Values for "invflags" field in struct ip6t_esp. */ | 6 | #define ip6t_esp xt_esp |
| 11 | #define IP6T_ESP_INV_SPI 0x01 /* Invert the sense of spi. */ | 7 | #define IP6T_ESP_INV_SPI XT_ESP_INV_SPI |
| 12 | #define IP6T_ESP_INV_MASK 0x01 /* All possible flags. */ | 8 | #define IP6T_ESP_INV_MASK XT_ESP_INV_MASK |
| 13 | 9 | ||
| 14 | #endif /*_IP6T_ESP_H*/ | 10 | #endif /*_IP6T_ESP_H*/ |
