All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Oester <kernel@linuxace.com>
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] TARPIT cleanups
Date: Sun, 18 Sep 2005 10:07:15 -0700	[thread overview]
Message-ID: <20050918170715.GA19936@linuxace.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

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



[-- Attachment #2: patch-tarpit --]
[-- Type: text/plain, Size: 845 bytes --]

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
--- pom-orig/patchlets/TARPIT/linux-2.6/net/ipv4/netfilter/ipt_TARPIT.c	2005-05-17 13:08:12.000000000 -0700
+++ pom-new/patchlets/TARPIT/linux-2.6/net/ipv4/netfilter/ipt_TARPIT.c	2005-09-18 10:04:35.000000000 -0700
@@ -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);

             reply	other threads:[~2005-09-18 17:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-18 17:07 Phil Oester [this message]
2005-09-19 15:01 ` [PATCH] TARPIT cleanups Harald Welte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050918170715.GA19936@linuxace.com \
    --to=kernel@linuxace.com \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.