New ip6t_HL target
Subsystems (2)
PATCH 2/2 New ip6t_HL target
Hi Dave,
please apply to net-2.6.14
Thanks!
Signature · 5 lines
- Harald Welte <[email protected]> http://netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie
[NETFILTER6] Add new ip6tables HOPLIMIT target
This target allows users to modify the hoplimit header field of the IPv6 header.
Signed-off-by Harald Welte <[email protected]>
---
commit 2accaf6a2b243cf1a4a0e50053759e01211f8b7d
tree 1ca883faa675af2c2ba597f0770cdcbf306aa760
parent cc7aa6d99761490f788fa3c61135e477172f1133
author Harald Welte <[email protected]> Fr, 26 Aug 2005 20:30:03 +0200 committer Harald Welte <[email protected]> Fr, 26 Aug 2005 20:30:03 +0200
include/linux/netfilter_ipv6/ip6t_HL.h | 22 +++++ net/ipv6/netfilter/Kconfig | 21 +++++ net/ipv6/netfilter/Makefile | 1 net/ipv6/netfilter/ip6t_HL.c | 134 ++++++++++++++++++++++++++++++++ 4 files changed, 178 insertions(+), 0 deletions(-)
include/linux/netfilter_ipv6/ip6t_HL.h new file +22 -0
@@ -0,0 +1,22 @@ +/* Hop Limit modification module for ip6tables +* Maciej Soltysiak <[email protected]> +* Based on HW's TTL module */ + +#ifndef _IP6T_HL_H +#define _IP6T_HL_H + +enum { +IP6T_HL_SET =0 , +IP6T_HL_INC , +IP6T_HL_DEC +}; + +#define IP6T_HL_MAXMODE IP6T_HL_DEC + +struct ip6t_HL_info { +u_int8_t mode; +u_int8_t hop_limit; +}; + + +#endif
net/ipv6/netfilter/Kconfig +21 -0
@@ -239,6 +239,27 @@ config IP6_NF_TARGET_MARK To compile it as a module, choose M here. If unsure, say N. +config IP6_NF_TARGET_HL + tristate 'HL (hoplimit) target support' + depends on IP6_NF_MANGLE + help + This option adds a `HL' target, which enables the user to decrement + the hoplimit value of the IPv6 header or set it to a given (lower) + value. + + If you want to compile it as a module, say M here and read + Documentation/modules.txt. If unsure, say `N'. + +config IP6_NF_TARGET_HL_INC + bool 'HL (hoplimit) incrementing support (DANGEROUS)' + depends on IP6_NF_TARGET_HL + help + This option enables functionality to increment and set the hoplimit + value of the IPv6 header to arbitrary values. This is EXTREMELY + DANGEROUS since you can easily create immortal packets that loop + forever on the network. Please only enable if you really know + that you will need it. + #dep_tristate ' LOG target support' CONFIG_IP6_NF_TARGET_LOG $CONFIG_IP6_NF_IPTABLES config IP6_NF_RAW tristate 'raw table support (required for TRACE)'
net/ipv6/netfilter/Makefile +1 -0
@@ -20,6 +20,7 @@ obj-$(CONFIG_IP6_NF_MATCH_PHYSDEV) += ip obj-$(CONFIG_IP6_NF_FILTER) += ip6table_filter.o obj-$(CONFIG_IP6_NF_MANGLE) += ip6table_mangle.o obj-$(CONFIG_IP6_NF_TARGET_MARK) += ip6t_MARK.o +obj-$(CONFIG_IP6_NF_TARGET_HL) += ip6t_HL.o obj-$(CONFIG_IP6_NF_QUEUE) += ip6_queue.o obj-$(CONFIG_IP6_NF_TARGET_LOG) += ip6t_LOG.o obj-$(CONFIG_IP6_NF_RAW) += ip6table_raw.o
net/ipv6/netfilter/ip6t_HL.c new file +134 -0
134 lines not on this page · raw message