Subject: Re: rarpd stops listening
To: =?iso-8859-1?Q?P=E5llen?= <pollen@astrakan.hig.se>
From: David Brownlee <abs@netbsd.org>
List: port-i386
Date: 02/10/2000 16:12:03
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-762258266-950199123=:22416
Content-Type: TEXT/PLAIN; charset=US-ASCII

	Bugger... could you try this version and let me know what output
	it gives?

	It looks like the problem ony ever occurs if rarpd has been left
	idle for a while?

		David/absolute

> It compiled.. I tested it and rebooted a couple of times... Some hours
> later I rebooted again:
> 
> nfs_boot: trying RARP (and RPC/bootparam)
> revarp failed, error=51
> cannot mount root, error=51
> 
> But after restarting rarpd it works again. *SIGH*

--0-762258266-950199123=:22416
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="rarpd.c"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.NEB.4.21.0002101612020.22416@oblivion.mono.org>
Content-Description: 
Content-Disposition: attachment; filename="rarpd.c"

LyoJJE5ldEJTRDogcmFycGQuYyx2IDEuMzUgMjAwMC8wMi8wNyAwMToxNTo1
MiBuYXRoYW53IEV4cCAkCSovDQoNCi8qDQogKiBDb3B5cmlnaHQgKGMpIDE5
OTAgVGhlIFJlZ2VudHMgb2YgdGhlIFVuaXZlcnNpdHkgb2YgQ2FsaWZvcm5p
YS4NCiAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQogKg0KICogUmVkaXN0cmli
dXRpb24gYW5kIHVzZSBpbiBzb3VyY2UgYW5kIGJpbmFyeSBmb3Jtcywgd2l0
aCBvciB3aXRob3V0DQogKiBtb2RpZmljYXRpb24sIGFyZSBwZXJtaXR0ZWQg
cHJvdmlkZWQgdGhhdDogKDEpIHNvdXJjZSBjb2RlIGRpc3RyaWJ1dGlvbnMN
CiAqIHJldGFpbiB0aGUgYWJvdmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhp
cyBwYXJhZ3JhcGggaW4gaXRz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