kern/107807: [patch] Spurious EHOSTDOWN errors -- ARP retransmission bug.

Dmitrij Tejblum tejblum at yandex-team.ru
Thu Jan 11 05:50:22 PST 2007


The following reply was made to PR kern/107807; it has been noted by GNATS.

From: Dmitrij Tejblum <tejblum at yandex-team.ru>
To: bug-followup at freebsd.org
Cc:  
Subject: Re: kern/107807: [patch] Spurious EHOSTDOWN errors -- ARP retransmission
 bug.
Date: Thu, 11 Jan 2007 16:29:21 +0300 (MSK)

 Oops, the following version of the patch is better:
 
 --- sys/netinet/if_ether.c	Tue Sep 26 14:22:07 2006
 +++ sys/netinet/if_ether.c	Thu Jan 11 16:23:54 2007
 @@ -493,15 +493,16 @@
  	if (la->la_asked < arp_maxtries)
  		error = EWOULDBLOCK;	/* First request. */
  	else
  		error = (rt == rt0) ? EHOSTDOWN : EHOSTUNREACH;
 
 -	if (la->la_asked++ == 0 || rt->rt_expire != time_second) {
 +	if (la->la_asked == 0 || rt->rt_expire != time_second) {
  		struct in_addr sin =
  		    SIN(rt->rt_ifa->ifa_addr)->sin_addr;
 
  		rt->rt_expire = time_second;
 +		la->la_asked++;
  		RT_UNLOCK(rt);
 
  		arprequest(ifp, &sin, &SIN(dst)->sin_addr,
  		    IF_LLADDR(ifp));
  	} else


More information about the freebsd-bugs mailing list