Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2000 17:01:18 +0300
From:      Peter Pentchev <roam@orbitel.bg>
To:        freebsd-bugs@freebsd.org
Subject:   [roam@orbitel.bg: Re: kern/19544: panic in delete_pipe (ipfw pipe delete)]
Message-ID:  <20000630170118.K1373@ringwraith.oblivion.bg>

next in thread | raw e-mail | index | archive | help
Hmm I think I sent this to the wrong address a while ago.

G'luck,
Peter Pentchev

----------------------------------------------
I am the thought you are now thinking.

----- Forwarded message from Peter Pentchev <roam@orbitel.bg> -----

Date: Tue, 27 Jun 2000 18:52:41 +0300
From: Peter Pentchev <roam@orbitel.bg>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Re: kern/19544: panic in delete_pipe (ipfw pipe delete)
User-Agent: Mutt/1.2i
In-Reply-To: <Pine.LNX.4.21.0006271411001.1699-100000@dev1.localdomain.net>; from olgeni@uli.it on Tue, Jun 27, 2000 at 02:12:05PM +0200

I think the attached patch solves this problem; at least, it works for me.

G'luck,
Peter Pentchev

----------------------------------------------
This sentence was in the past tense.

On Tue, Jun 27, 2000 at 02:12:05PM +0200, Jimmy Olgeni wrote:
> 
> >Description:
> If there are no dummynet pipes configured in the system, an attempt to delete
> any pipe with "ipfw pipe delete" will result in a kernel panic (trap 12).
> 
> >Fix:

diff -c sys/netinet/ip_dummynet.c.orig sys/netinet/ip_dummynet.c
*** ip_dummynet.c.orig	Tue Jun 27 18:40:50 2000
--- ip_dummynet.c	Tue Jun 27 18:35:11 2000
***************
*** 1546,1551 ****
--- 1546,1554 ----
  	struct dn_pipe *a, *b;
  	struct dn_flow_set *fs;
  
+ 	if (all_pipes == NULL)
+ 	    return EINVAL; /* no pipes defined, nothing to do */
+ 
  	/* locate pipe */
  	for (a = NULL , b = all_pipes ; b && b->pipe_nr < p->pipe_nr ;
  		 a = b , b = b->next) ;
***************
*** 1581,1586 ****
--- 1584,1592 ----
  	    free(b, M_IPFW);
      } else { /* this is a dummynet queue (dn_flow_set) */
  	struct dn_flow_set *a, *b;
+ 
+ 	if (all_flow_sets == NULL)
+ 	    return EINVAL; /* no flow sets defined, nothing to do */
  
  	/* locate set */
  	for (a = NULL, b = all_flow_sets ; b && b->fs_nr < p->fs.fs_nr ;

----- End forwarded message -----


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000630170118.K1373>