All of lore.kernel.org
 help / color / mirror / Atom feed
* please fix TARPIT
@ 2005-12-22  6:15 David S. Miller
  2005-12-22 20:36 ` iptables/netlink/java Oscar Mechanic
  2006-01-03  7:34 ` please fix TARPIT Jan Engelhardt
  0 siblings, 2 replies; 10+ messages in thread
From: David S. Miller @ 2005-12-22  6:15 UTC (permalink / raw)
  To: netfilter-devel


Recently it was reported that the TARPIT target depends upon the
sysctl_ip_default_ttl symbol which is not exported any longer.

Any use is illegal, because the TTL is a property of a route and
should thus be obtained from the RTAX_HOPLIMIT metric.  The only
valid reference is in the ipv4 routing code where it sets the
default value of this route metric.

So, tarpit_tcp() should compute 'nrt' a little earlier and then grab
the RTAX_HOPLIMIT dst metric to store into nskb->nh.iph->ttl field.
(as a side note it should probably use pskb_may_pull() and skb_unshare()
 instead of the dangerously hand-crafted stuff it's using there, skb_copy()
 is overkill especially for non-local packets on a firewall/router, and
 yeah there seems to be nf_debug references in there too :-).

Wheee, there's also a copy of ip_finish_output2() in there as well.
It should probably use dst_output() so that paths over IPSEC and
things like that work.

If someone could take care of this (bonus points for grepping other
code in patch-o-matic for references to this sysctl_ip_default_ttl
symbol) I would really appreciate it.

Thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-01-05 21:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-22  6:15 please fix TARPIT David S. Miller
2005-12-22 20:36 ` iptables/netlink/java Oscar Mechanic
2005-12-22 20:39   ` iptables/netlink/java Gary W. Smith
2006-01-03  7:34 ` please fix TARPIT Jan Engelhardt
2006-01-03 11:22   ` Patrick McHardy
2006-01-03 20:30     ` David S. Miller
2006-01-05  8:08     ` [PATCH] use HOPLIMIT metric as TTL of TCP reset sent by REJECT [was: Re: please fix TARPIT] Yasuyuki KOZAKAI
2006-01-05  8:21       ` Patrick McHardy
2006-01-05 21:16         ` [PATCH] use HOPLIMIT metric as TTL of TCP reset sent by REJECT David S. Miller
2006-01-03 20:29   ` please fix TARPIT David S. Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.