Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site celerity.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!tektronix!hplabs!sdcrdcf!sdcsvax!sdcc6!celerity!ron
From: ron@celerity.UUCP (Ron McDaniels)
Newsgroups: net.bugs.4bsd
Subject: Internet bug fix
Message-ID: <254@celerity.UUCP>
Date: Wed, 16-Jan-85 18:13:35 EST
Article-I.D.: celerity.254
Posted: Wed Jan 16 18:13:35 1985
Date-Received: Mon, 21-Jan-85 02:19:02 EST
Distribution: net
Organization: Celerity Computing, San Diego, Ca.
Lines: 44

Subject: ip_init stores a random char in memory.
Index:	sys/netinet/ip_input.c 4.2BSD

Description:
	Under a set of circumstances that only Murphy could understand,
	a coding bug in ip_init causes a single byte of memory to be
	clobbered.

Repeat-By:
	Probably not deliberately repeatable.

Fix:
	A diff of sys/netinet/ip_input.c follows.
	The line numbers are undoubtedly not what you expect.


***************
*** 43,49
  	for (i = 0; i < IPPROTO_MAX; i++)
  		ip_protox[i] = pr - inetsw;
  	for (pr = inetdomain.dom_protosw;
! 	    pr < inetdomain.dom_protoswNPROTOSW; pr++)
  		if (pr->pr_family == PF_INET &&
  		    pr->pr_protocol && pr->pr_protocol != IPPROTO_RAW)
  			ip_protox[pr->pr_protocol] = pr - inetsw;

--- 43,49 -----
  	for (i = 0; i < IPPROTO_MAX; i++)
  		ip_protox[i] = pr - inetsw;
  	for (pr = inetdomain.dom_protosw;
! 	    pr <= inetdomain.dom_protoswNPROTOSW; pr++)
  		if (pr->pr_family == PF_INET &&
  		    pr->pr_protocol && pr->pr_protocol != IPPROTO_RAW)
  			ip_protox[pr->pr_protocol] = pr - inetsw;




R. L. (Ron) McDaniels
CELERITY COMPUTING
9692 Via Excellencia Way
San Diego, California 92126
(619) 271-9940
{decvax || ucbvax || ihnp4 || akgua || philabs}!sdcsvax!celerity!ron