All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@gmx.net>
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] remove overzealous checks in REJECT target
Date: Wed, 01 Dec 2004 07:41:39 +0100	[thread overview]
Message-ID: <41AD67A3.6090608@gmx.net> (raw)

Hi,

after wondering why the REJECT target didn't work as expected
when scanned with nmap -sO, I found a check in ipt_REJECT.c
for 8 or more bytes of proto header which caused all packets
gernated by nmap to be dropped although they were sent to the
REJECT target. Since I could not see any use for the proto
header length check, I replaced it with a warning.
Now the REJECT target works as expected for all packets I
could thow at it.

Regards,
Carl-Daniel
-- 
http://www.hailfinger.org/

Signed-off-by Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@gmx.net>
--- linux-2.6.9/net/ipv4/netfilter/ipt_REJECT.c~	Wed Dec  1 06:38:06 2004
+++ linux-2.6.9/net/ipv4/netfilter/ipt_REJECT.c	Wed Dec  1 06:41:04 2004
@@ -255,7 +255,7 @@ static void send_unreach(struct sk_buff

 	/* Ensure we have at least 8 bytes of proto header. */
 	if (skb_in->len < skb_in->nh.iph->ihl*4 + 8)
-		return;
+		printk("REJECT: we have less than 8 bytes of proto header.\n");

 	/* if UDP checksum is set, verify it's correct */
 	if (iph->protocol == IPPROTO_UDP

             reply	other threads:[~2004-12-01  6:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-01  6:41 Carl-Daniel Hailfinger [this message]
2004-12-02  6:17 ` [PATCH] remove overzealous checks in REJECT target Yasuyuki Kozakai
2004-12-15 23:31   ` Carl-Daniel Hailfinger

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=41AD67A3.6090608@gmx.net \
    --to=c-d.hailfinger.kernel.2004@gmx.net \
    --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.