Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Nov 1996 10:05:40 -0500
From:      jc@irbs.com (John Capo)
To:        gurney_j@resnet.uoregon.edu (John-Mark Gurney)
Cc:        hackers@freebsd.org (FreeBSD Hackers)
Subject:   Re: gated problems
Message-ID:  <199611141505.KAA27671@irbs.irbs.com>
In-Reply-To: <Pine.NEB.3.95.961114011742.24763N-100000@nike>; from John-Mark Gurney on Nov 14, 1996 01:22:59 -0800
References:  <Pine.NEB.3.95.961114011742.24763N-100000@nike>

next in thread | previous in thread | raw e-mail | index | archive | help
3.5 and 3.6A2 both core when a interface is deleted if RIP is being
sent on the deleted interface.  I haven't had a problem when
interfaces appear, only when they are deleted.  I switched to BGP
on the serial links and ignored the problem.

This patch floated by on the gated list that may solve the core
problem.  I havn't tried it.

When an interface address was deleted the protocols would always be 
notified with IFC_DELETE.  When the interface was up when it went away 
the protocols should have been notified with IFC_DELETE|IFC_UPDOWN.

This fixes core dumps when interfaces (usually PPP or SLIP) came up
and went down alot.

Index: if.c
===================================================================
RCS file: /master/contrib/gated-R3_5Beta_3/src/if.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 if.c
*** if.c	1996/10/17 20:14:51	1.1.1.1
--- if.c	1996/10/18 18:58:47
***************
*** 1616,1622 ****
  		if (!BIT_TEST(ifap->ifa_state, IFS_DELETE)) {
  		    /* Up - mark it down */
  
! 		    ifap->ifa_change = IFC_DELETE;
  		}
  		break;
  	    }
--- 1616,1627 ----
  		if (!BIT_TEST(ifap->ifa_state, IFS_DELETE)) {
  		    /* Up - mark it down */
  
! 		    if (BIT_TEST(ifap->ifa_state, IFS_UP)) {
! 			BIT_RESET(ifap->ifa_state, IFS_UP);
! 			ifap->ifa_change = IFC_DELETE|IFC_UPDOWN;
! 		    } else {
! 			ifap->ifa_change = IFC_DELETE;
! 		    }
  		}
  		break;
  	    }

A port for 3.6A2 is at ftp://ftp.irbs.com/FreeBSD/ports/gated-3.6a2.tgz

John Capo




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