Skip to content

Commit 563d36e

Browse files
Jan Engelhardtkaber
authored andcommitted
netfilter: Combine ipt_TTL and ip6t_HL source
Suggested by: James King <t.james.king@gmail.com> Similarly to commit c9fd496, merge TTL and HL. Since HL does not depend on any IPv6-specific function, no new module dependencies would arise. With slight adjustments to the Kconfig help text. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
1 parent ddc214c commit 563d36e

9 files changed

Lines changed: 187 additions & 226 deletions

File tree

‎net/ipv4/netfilter/Kconfig‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -322,21 +322,6 @@ config IP_NF_TARGET_ECN
322322

323323
To compile it as a module, choose M here. If unsure, say N.
324324

325-
config IP_NF_TARGET_TTL
326-
tristate 'TTL target support'
327-
depends on IP_NF_MANGLE
328-
depends on NETFILTER_ADVANCED
329-
help
330-
This option adds a `TTL' target, which enables the user to modify
331-
the TTL value of the IP header.
332-
333-
While it is safe to decrement/lower the TTL, this target also enables
334-
functionality to increment and set the TTL value of the IP header to
335-
arbitrary values. This is EXTREMELY DANGEROUS since you can easily
336-
create immortal packets that loop forever on the network.
337-
338-
To compile it as a module, choose M here. If unsure, say N.
339-
340325
# raw + specific targets
341326
config IP_NF_RAW
342327
tristate 'raw table support (required for NOTRACK/TRACE)'

‎net/ipv4/netfilter/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
6161
obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o
6262
obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
6363
obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o
64-
obj-$(CONFIG_IP_NF_TARGET_TTL) += ipt_TTL.o
6564
obj-$(CONFIG_IP_NF_TARGET_ULOG) += ipt_ULOG.o
6665

6766
# generic ARP tables

‎net/ipv4/netfilter/ipt_TTL.c‎

Lines changed: 0 additions & 97 deletions
This file was deleted.

‎net/ipv6/netfilter/Kconfig‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -170,23 +170,6 @@ config IP6_NF_MANGLE
170170

171171
To compile it as a module, choose M here. If unsure, say N.
172172

173-
config IP6_NF_TARGET_HL
174-
tristate 'HL (hoplimit) target support'
175-
depends on IP6_NF_MANGLE
176-
depends on NETFILTER_ADVANCED
177-
help
178-
This option adds a `HL' target, which enables the user to decrement
179-
the hoplimit value of the IPv6 header or set it to a given (lower)
180-
value.
181-
182-
While it is safe to decrement the hoplimit value, this option also
183-
enables functionality to increment and set the hoplimit value of the
184-
IPv6 header to arbitrary values. This is EXTREMELY DANGEROUS since
185-
you can easily create immortal packets that loop forever on the
186-
network.
187-
188-
To compile it as a module, choose M here. If unsure, say N.
189-
190173
config IP6_NF_RAW
191174
tristate 'raw table support (required for TRACE)'
192175
depends on NETFILTER_ADVANCED

‎net/ipv6/netfilter/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@ obj-$(CONFIG_IP6_NF_MATCH_OPTS) += ip6t_hbh.o
2727
obj-$(CONFIG_IP6_NF_MATCH_RT) += ip6t_rt.o
2828

2929
# targets
30-
obj-$(CONFIG_IP6_NF_TARGET_HL) += ip6t_HL.o
3130
obj-$(CONFIG_IP6_NF_TARGET_LOG) += ip6t_LOG.o
3231
obj-$(CONFIG_IP6_NF_TARGET_REJECT) += ip6t_REJECT.o

‎net/ipv6/netfilter/ip6t_HL.c‎

Lines changed: 0 additions & 95 deletions
This file was deleted.

‎net/netfilter/Kconfig‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,21 @@ config NETFILTER_XT_TARGET_DSCP
357357

358358
To compile it as a module, choose M here. If unsure, say N.
359359

360+
config NETFILTER_XT_TARGET_HL
361+
tristate '"HL" hoplimit target support'
362+
depends on IP_NF_MANGLE || IP6_NF_MANGLE
363+
depends on NETFILTER_ADVANCED
364+
---help---
365+
This option adds the "HL" (for IPv6) and "TTL" (for IPv4)
366+
targets, which enable the user to change the
367+
hoplimit/time-to-live value of the IP header.
368+
369+
While it is safe to decrement the hoplimit/TTL value, the
370+
modules also allow to increment and set the hoplimit value of
371+
the header to arbitrary values. This is EXTREMELY DANGEROUS
372+
since you can easily create immortal packets that loop
373+
forever on the network.
374+
360375
config NETFILTER_XT_TARGET_MARK
361376
tristate '"MARK" target support'
362377
default m if NETFILTER_ADVANCED=n

‎net/netfilter/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIFY) += xt_CLASSIFY.o
4545
obj-$(CONFIG_NETFILTER_XT_TARGET_CONNMARK) += xt_CONNMARK.o
4646
obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o
4747
obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o
48+
obj-$(CONFIG_NETFILTER_XT_TARGET_HL) += xt_HL.o
4849
obj-$(CONFIG_NETFILTER_XT_TARGET_MARK) += xt_MARK.o
4950
obj-$(CONFIG_NETFILTER_XT_TARGET_NFLOG) += xt_NFLOG.o
5051
obj-$(CONFIG_NETFILTER_XT_TARGET_NFQUEUE) += xt_NFQUEUE.o

0 commit comments

Comments
 (0)