mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: mhaque@haque.net
Cc: ionut@cs.columbia.edu, linux-kernel@vger.kernel.org
Subject: Re: ip_defrag is broken (was: Re: test12 lockups -- need feedback)
Date: Thu, 14 Dec 2000 12:23:19 -0800	[thread overview]
Message-ID: <200012142023.MAA12823@pizda.ninka.net> (raw)
In-Reply-To: <Pine.LNX.4.30.0012141535310.12994-100000@viper.haque.net> (mhaque@haque.net)
In-Reply-To: <Pine.LNX.4.30.0012141535310.12994-100000@viper.haque.net>

   Date: Thu, 14 Dec 2000 15:35:48 -0500 (EST)
   From: "Mohammad A. Haque" <mhaque@haque.net>

   I'll be trying in a few hours.

Meanwhile for people wanting the crashes to be fixed, please
apply this patch.

This was _always_ broken, and really what netfilter is doing
should have never worked.  The only theory I have right now
is that people using netfilter never had IP fragments timeout.
:-)

So the patch below restores previous behavior exactly.
Ie. netfilter sources fragments cannot send ICMP errors
on frag queue timeout :-)

(The line numbers may be off a bit, but "patch" should still
 eat it).

--- net/ipv4/ip_fragment.c.~1~	Wed Dec 13 10:31:48 2000
+++ net/ipv4/ip_fragment.c	Thu Dec 14 12:20:09 2000
@@ -258,7 +258,8 @@
 	if ((qp->last_in&FIRST_IN) && qp->fragments != NULL) {
 		struct sk_buff *head = qp->fragments;
 		/* Send an ICMP "Fragment Reassembly Timeout" message. */
-		if ((head->dev = dev_get_by_index(qp->iif)) != NULL) {
+		if (qp->iif != -1 &&
+		    (head->dev = dev_get_by_index(qp->iif)) != NULL) {
 			icmp_send(head, ICMP_TIME_EXCEEDED, ICMP_EXC_FRAGTIME, 0);
 			dev_put(head->dev);
 		}
@@ -487,8 +488,12 @@
 	else
 		qp->fragments = skb;
 
-	qp->iif = skb->dev->ifindex;
-	skb->dev = NULL;
+	if (skb->dev != NULL) {
+		qp->iif = skb->dev->ifindex;
+		skb->dev = NULL;
+	} else
+		qp->iif = -1;
+
 	qp->stamp = skb->stamp;
 	qp->meat += skb->len;
 	atomic_add(skb->truesize, &ip_frag_mem);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-12-14 21:10 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-13 23:22 test12 lockups -- need feedback Mohammad A. Haque
2000-12-14  0:22 ` Mikael Djurfeldt
2000-12-14  0:29   ` Mikael Djurfeldt
2000-12-14  1:28     ` dep
2000-12-14  2:58 ` Mohammad A. Haque
2000-12-14  3:48   ` Mohammad A. Haque
2000-12-14 12:21     ` Ingo Oeser
2000-12-14 11:42       ` Mohammad A. Haque
2000-12-15 15:20         ` Ingo Oeser
2000-12-14 12:10       ` dep
2000-12-14 12:15         ` Mohammad A. Haque
2000-12-14 13:16           ` dep
2000-12-14 14:41           ` Bob_Tracy
2000-12-14 18:38           ` ip_defrag is broken (was: Re: test12 lockups -- need feedback) Ion Badulescu
2000-12-14 19:27             ` David S. Miller
2000-12-14 19:52               ` Ion Badulescu
2000-12-14 19:43                 ` David S. Miller
2000-12-14 20:07                   ` Ion Badulescu
2000-12-14 19:55                     ` Netfilter is broken (was Re: ip_defrag is broken (was: Re: test12 lockups -- need feedback)) David S. Miller
2000-12-15  0:11                       ` David S. Miller
2000-12-15  0:48                         ` Andi Kleen
2000-12-15  1:25                           ` Harald Welte
2000-12-15  0:20                       ` Harald Welte
2000-12-14 20:35                     ` ip_defrag is broken (was: Re: test12 lockups -- need feedback) Mohammad A. Haque
2000-12-14 20:23                       ` David S. Miller [this message]
2000-12-14 21:25                         ` Mohammad A. Haque
2000-12-14 22:50                           ` Mohammad A. Haque
2000-12-14 23:58                             ` Mohammad A. Haque
2000-12-15  8:52                             ` Jasper Spaans
2000-12-15  9:22                             ` Tom Leete
2000-12-15  2:25                         ` Tom Leete
2000-12-15 13:12                         ` Rusty Russell
2000-12-14 20:49             ` Bob_Tracy
2000-12-14 22:39 Bob_Tracy

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=200012142023.MAA12823@pizda.ninka.net \
    --to=davem@redhat.com \
    --cc=ionut@cs.columbia.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhaque@haque.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®