o Increment requests counter right before send out an ARP query actually.

Otherwise the code could lead to the spurious EHOSTDOWN errors.

PR:		kern/107807
Submitted by:	Dmitrij Tejblum
MFC after:	1 month
This commit is contained in:
maxim 2007-01-14 18:44:17 +00:00
parent 79662cd11c
commit 3251ecf31a

View File

@ -496,11 +496,12 @@ arpresolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m,
else
error = (rt == rt0) ? EHOSTDOWN : EHOSTUNREACH;
if (la->la_asked++ == 0 || rt->rt_expire != time_uptime) {
if (la->la_asked == 0 || rt->rt_expire != time_uptime) {
struct in_addr sin =
SIN(rt->rt_ifa->ifa_addr)->sin_addr;
rt->rt_expire = time_uptime;
la->la_asked++;
RT_UNLOCK(rt);
arprequest(ifp, &sin, &SIN(dst)->sin_addr,