Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site umcp-cs.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!teddy!panda!talcott!harvard!seismo!umcp-cs!chris
From: chris@umcp-cs.UUCP (Chris Torek)
Newsgroups: net.bugs.4bsd
Subject: fairly major blunder in sys/net/route.c$rtrequest()
Message-ID: <2455@umcp-cs.UUCP>
Date: Sat, 12-Jan-85 22:22:34 EST
Article-I.D.: umcp-cs.2455
Posted: Sat Jan 12 22:22:34 1985
Date-Received: Mon, 14-Jan-85 03:16:43 EST
Distribution: net
Organization: U of Maryland, Computer Science Dept., College Park, MD
Lines: 30

Index: sys/net/route.c 4.2BSD Fix

Description:
	The code for computing route table entry pointers in
	rtrequest() is wrong.  It will occasionally use negative
	offsets, wreaking havoc.  It is interesting to note that the
	rest of the code in the same module does not have the bug.

Repeat-By:
	Difficult; you need to add a route entry whose hash is a
	negative number, and some negative values will sometimes
	appear to work.

Fix:
	The declaration for the variable ``hash'' should be an
	unsigned integer.  Find the line reading

		int s, error = 0, hash, (*match)();

	and move ``hash'' down a line onto the

		u_int af;

	declaration (or do what Berkeley did and make a new u_int line).
-- 
(This line accidently left nonblank.)

In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@maryland