Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Sep 2002 11:40:06 -0700 (PDT)
From:      Per Hedeland <per@bluetail.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: misc/34842: VmWare port + NIS causes "broadcast storm"
Message-ID:  <200209081840.g88Ie6VC087073@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/34842; it has been noted by GNATS.

From: Per Hedeland <per@bluetail.com>
To: freebsd-gnats-submit@FreeBSD.org, per@bluetail.com
Cc:  
Subject: Re: misc/34842: VmWare port + NIS causes "broadcast storm"
Date: Sun, 08 Sep 2002 20:35:25 +0200

 I replied directly to iedowse@FreeBSD.org on this issue, but apparently
 that didn't "take", so here's the gist of that response:
 
 -------
 > Your patch
 >for problem 2 (if_tap.c) is probably not necessary, and other network
 >drivers can get into similar states too, so keeping the changes in
 >userland is better.
 
 Yes, thinking a bit more about it, I agree - and the kernel patch is
 really a rather broken way to deal with it, since it causes information
 loss, even if the information is pretty useless in this case.
 
 >May I close this report now?
 
 Sure.
 
 > Maybe you would like to suggest a patch
 >for ypbind to make it sleep for a while after before repeating the
 >clnt_broadcast operation if it fails?
 
 Well, I looked at it a bit, and doing it "right" is rather more work
 than I'm prepared to do right now, since that really would need to be
 tested too. I.e. the main process should wait before forking off a new
 broadcaster, but I believe it shouldn't block during that wait - so it
 would need to note the failure (which would need to be returned from
 rpc_received() via handle_children()), use a shorter select() timeout,
 and then do the retry when that timeout expires, keeping in mind that
 other requests may arrive in the meantime so the timeout should really
 be re-calculated based on gettimeofday() etc...
 
 Below is a "stupid" but almost certainly "safe" patch - still untested
 though.
 
 --Per
 
 ---------------------------
 --- /usr/src/usr.sbin/ypbind/ypbind.c.ORIG      Sat Jul  7 09:30:51 2001
 +++ /usr/src/usr.sbin/ypbind/ypbind.c   Sat Jul  6 03:47:33 2002
 @@ -596,6 +596,13 @@
         struct timeval timeout;
         fd_set fds;
  
 +       if (addr->sin_addr.s_addr == (long)0) {
 +               /* Wait a bit before telling parent about failure, since it
 +                  will retry immediately - the wait should really be before
 +                  that retry in the parent, but this is simpler...         */
 +               sleep(2);
 +       }
 +
         timeout.tv_sec = 5;
         timeout.tv_usec = 0;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209081840.g88Ie6VC087073>