forward port of TTL.patch to 2.6.0-test9
Subsystems (2)
Hi list,
I just forward ported TTL.patch (attached) from patch-o-matic-20031103 to linux-2.6.0-test9 for fun and profit. It's rather mechanical port but it works at least build-in. I've veryfied this with tcpdump.
But I have two questions. First of course is: is this the proper way to port things like this, couse AFAIC 2.4 and 2.5 networking code is quite different, if not why. And second - where I can read about current implementation ot linux networking excetp kernel sources.
wwell Larry.
P.S please cc me, I'm not subscribet to the list.
include/linux/netfilter_ipv4/ipt_TTL.h +21 -0
@@ -0,0 +1,21 @@ +/* TTL modification module for IP tables +* (C) 2000 by Harald Welte <[email protected]> */ + +#ifndef _IPT_TTL_H +#define _IPT_TTL_H + +enum { +IPT_TTL_SET =0 , +IPT_TTL_INC , +IPT_TTL_DEC +}; + +#define IPT_TTL_MAXMODE IPT_TTL_DEC + +struct ipt_TTL_info { +u_int8_t mode; +u_int8_t ttl; +}; + + +#endif
net/ipv4/netfilter/Kconfig +11 -0
@@ -478,6 +478,17 @@ To compile it as a module, choose M here. If unsure, say N. +config IP_NF_TARGET_TTL + tristate "TTL target support" + depends on IP_NF_MANGLE + help + This option adds a `TTL' target, which enables the user to set + the TTL value or increment / decrement the TTL value by a given + amount. + + If you want to compile it as a module, say M here and read + Documentation/modules.txt. If unsure, say `N'. + config IP_NF_TARGET_LOG tristate "LOG target support" depends on IP_NF_IPTABLES
net/ipv4/netfilter/Makefile +1 -0
@@ -78,6 +78,7 @@ obj-$(CONFIG_IP_NF_TARGET_SAME) += ipt_SAME.o obj-$(CONFIG_IP_NF_TARGET_CLASSIFY) += ipt_CLASSIFY.o obj-$(CONFIG_IP_NF_NAT_SNMP_BASIC) += ip_nat_snmp_basic.o +obj-$(CONFIG_IP_NF_TARGET_TTL) += ipt_TTL.o obj-$(CONFIG_IP_NF_TARGET_LOG) += ipt_LOG.o obj-$(CONFIG_IP_NF_TARGET_ULOG) += ipt_ULOG.o obj-$(CONFIG_IP_NF_TARGET_TCPMSS) += ipt_TCPMSS.o
net/ipv4/netfilter/ipt_TTL.c +121 -0
121 lines not on this page · raw message
Quoted 7 lines · Kostadin Karaivanov
Hi list,
I just forward ported TTL.patch (attached) from patch-o-matic-20031103 to linux-2.6.0-test9 for fun and profit. It's rather mechanical port but it works at least build-in. I've veryfied this with tcpdump. But I have two questions. First of course is: is this the proper way to port things like this, couse AFAIC 2.4 and 2.5 networking code is quite different, if not why.
no, I don't see a problem with this 2.6 merge. However, we still don't have a 2.6-ready patch-o-matic (I'm working on it), so I cannot really integrate it somewhere.
Quoted 2 lines
And second - where I can read about current > implementation ot linux networking excetp kernel sources.
I doubt there is any information apart from the netdev and linux-kernel mailinglist archives.
Quoted 3 lines
wwell Larry.
P.Splease cc me, I'm not subscribet to the list.
Signature · 5 lines
- Harald Welte <[email protected]> http://www.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