Subject: Re: dhclient still taking up 95% of CPU
To: None <current-users@netbsd.org>
From: Peter Seebach <seebs@plethora.net>
List: current-users
Date: 10/22/2000 09:18:41
In message <20001022095345.A6106@vex>, David Maxwell writes:
>Have you tried a ktrace?

The problem appears to be that, if the lease value is too large,
select() returns EINVAL.

The enclosed patch fixes it on my system.

*** omapip/dispatch.c.orig	Sat Oct 21 19:11:08 2000
--- omapip/dispatch.c	Sat Oct 21 19:09:28 2000
***************
*** 284,289 ****
--- 284,292 ----
  	}
  
  	/* Wait for a packet or a timeout... XXX */
+ 	if (to.tv_sec > 100000) {
+ 		to.tv_sec = 100000;
+ 	}
  	count = select (max + 1, &r, &w, &x, t ? &to : (struct timeval *)0);
  
  	/* Get the current time... */