diff options
| author | fan.du <fan.du@windriver.com> | 2013-12-17 22:27:02 -0500 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-12-24 06:37:58 -0500 |
| commit | 6a649f339802f104549e1fb211e381036661e244 (patch) | |
| tree | 673fd543f147e890e2cd34deceaa70606ff83054 /include/uapi/linux | |
| parent | 08c0cad69f32ad1e881fa3fb7f5e0a25db5b07ce (diff) | |
netfilter: add IPv4/6 IPComp extension match support
With this plugin, user could specify IPComp tagged with certain
CPI that host not interested will be DROPped or any other action.
For example:
iptables -A INPUT -p 108 -m ipcomp --ipcompspi 0x87 -j DROP
ip6tables -A INPUT -p 108 -m ipcomp --ipcompspi 0x87 -j DROP
Then input IPComp packet with CPI equates 0x87 will not reach
upper layer anymore.
Signed-off-by: Fan Du <fan.du@windriver.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/netfilter/Kbuild | 1 | ||||
| -rw-r--r-- | include/uapi/linux/netfilter/xt_ipcomp.h | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/uapi/linux/netfilter/Kbuild b/include/uapi/linux/netfilter/Kbuild index 17c3af2c4bb9..91be8ce623f0 100644 --- a/include/uapi/linux/netfilter/Kbuild +++ b/include/uapi/linux/netfilter/Kbuild | |||
| @@ -54,6 +54,7 @@ header-y += xt_ecn.h | |||
| 54 | header-y += xt_esp.h | 54 | header-y += xt_esp.h |
| 55 | header-y += xt_hashlimit.h | 55 | header-y += xt_hashlimit.h |
| 56 | header-y += xt_helper.h | 56 | header-y += xt_helper.h |
| 57 | header-y += xt_ipcomp.h | ||
| 57 | header-y += xt_iprange.h | 58 | header-y += xt_iprange.h |
| 58 | header-y += xt_ipvs.h | 59 | header-y += xt_ipvs.h |
| 59 | header-y += xt_length.h | 60 | header-y += xt_length.h |
diff --git a/include/uapi/linux/netfilter/xt_ipcomp.h b/include/uapi/linux/netfilter/xt_ipcomp.h new file mode 100644 index 000000000000..45c7e40eb8e1 --- /dev/null +++ b/include/uapi/linux/netfilter/xt_ipcomp.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef _XT_IPCOMP_H | ||
| 2 | #define _XT_IPCOMP_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | struct xt_ipcomp { | ||
| 7 | __u32 spis[2]; /* Security Parameter Index */ | ||
| 8 | __u8 invflags; /* Inverse flags */ | ||
| 9 | __u8 hdrres; /* Test of the Reserved Filed */ | ||
| 10 | }; | ||
| 11 | |||
| 12 | /* Values for "invflags" field in struct xt_ipcomp. */ | ||
| 13 | #define XT_IPCOMP_INV_SPI 0x01 /* Invert the sense of spi. */ | ||
| 14 | #define XT_IPCOMP_INV_MASK 0x01 /* All possible flags. */ | ||
| 15 | |||
| 16 | #endif /*_XT_IPCOMP_H*/ | ||
