Skip to contentSkip to conversation

TARPIT cleanups

PATCH Applied Phil Oester 2 participants 2 messages Sep 18, 2005 – Sep 19, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 TARPIT cleanups

TARPIT target doesn't compile with 2.6.14-rc due to nfcache references, and also doesn't compile if CONFIG_SYSCTL is not set. Below patch fixes both, and closes bugzilla #387.

Phil

patchlets/TARPIT/linux-2.6/net/ipv4/netfilter/ipt_TARPIT.c +4 -1
diff -ru pom-orig/patchlets/TARPIT/linux-2.6/net/ipv4/netfilter/ipt_TARPIT.c pom-new/patchlets/TARPIT/linux-2.6/net/ipv4/netfilter/ipt_TARPIT.c
@@ -121,7 +121,6 @@
 	/* This packet will not be the same as the other: clear nf fields */
 	nf_conntrack_put(nskb->nfct);
 	nskb->nfct = NULL;
-	nskb->nfcache = 0;
 #ifdef CONFIG_NETFILTER_DEBUG
 	nskb->nf_debug = 0;
 #endif
@@ -172,7 +171,11 @@
 						sizeof(struct tcphdr), 0));
 
 	/* Adjust IP TTL */
+#ifdef CONFIG_SYSCTL
 	nskb->nh.iph->ttl = sysctl_ip_default_ttl;
+#else
+	nskb->nh.iph->ttl = IPDEFTTL;
+#endif
 
 	/* Set DF, id = 0 */
 	nskb->nh.iph->frag_off = htons(IP_DF);
Applied
#1 lore raw
Quoted 3 lines · Phil Oester

TARPIT target doesn't compile with 2.6.14-rc due to nfcache references, and also doesn't compile if CONFIG_SYSCTL is not set. Below patch fixes both, and closes bugzilla #387.

thanks, applied.

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