*BSD News Article 8879


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.hawaii.edu!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!caen!batcomputer!cornell!newsstand.cit.cornell.edu!newsstand.cit.cornell.edu!jch
From: Jeffrey C Honig <jch@nr-tech.cit.cornell.edu>
Subject: Re: [386bsd] ICMP redirect handling panic - FIX
In-Reply-To: andrew@werple.apana.org.au's message of 14 Dec 1992 13: 30:41 +1100
Message-ID: <JCH.92Dec14142820@mitchell.cit.cornell.edu>
Sender: news@mail.cornell.edu
Nntp-Posting-Host: mitchell.cit.cornell.edu
Nntp-Posting-User: @cornell.edu
Organization: Information Technologies/Network Resources; Cornell University;
	Ithaca, NY USA
References: <1ggrkhINN67h@werple.apana.org.au>
Date: Mon, 14 Dec 1992 19:28:20 GMT
Lines: 32

In article <1ggrkhINN67h@werple.apana.org.au> andrew@werple.apana.org.au (Andrew Herbert) writes:
>
>  The fact that the ENETUNREACH branch (look in the source for rtredirect()),
>  the cause of the panic, is taken at all makes me somewhat dubious as to whether
>  pcroute is doing the right thing.  printf()s indicated that the redirects were
>  coming from the router's slip interface that had just died, rather than the
>  ethernet interface as is (reasonably) expected by 386bsd.  But in any case, it
>  certainly uncovered a 386bsd bug.

No, pcroute is not doing the right thing, the source address of the
redirect should be on the same network.  Yes, that is a 386bsd bug,
present in Reno, Net-2 and 4.4 Alpha.

>  ***************
>  *** 170,175 ****
>  --- 174,183 ----
>	   if (!(flags & RTF_DONE) && rt && !equal(src, rt->rt_gateway))
>		   error = EINVAL;
>	   else if (ifa_ifwithaddr(gateway))
>  + /*
>  +  * XXX - shouldn't this be testing whether (ifa_ifwithaddr(gateway) == 0) ???
>  +  * i.e. gateway can't be reached from any interface - andrew@werple, 12 Dec 92
>  +  */
>		   error = EHOSTUNREACH;
>	   if (error)
>		   goto done;

There is an earlier check for ifa_ifwithnet(gateway) being zero.  This
check just makes sure that the new gateway is not an interface on this
host.

Jeff