Index: if_ether.c =================================================================== RCS file: /home/ncvs/src/sys/netinet/if_ether.c,v retrieving revision 1.64.2.17 diff -u -r1.64.2.17 if_ether.c --- if_ether.c 20 Feb 2002 23:34:09 -0000 1.64.2.17 +++ if_ether.c 9 Mar 2002 21:40:02 -0000 @@ -94,9 +94,8 @@ struct llinfo_arp { LIST_ENTRY(llinfo_arp) la_le; struct rtentry *la_rt; - struct mbuf *la_hold; /* last packet until resolved/timeout */ - long la_asked; /* last time we QUERIED for this addr */ -#define la_timer la_rt->rt_rmx.rmx_expire /* deletion time in seconds */ + struct mbuf *la_hold; /* last packet until resolved/timeout */ + long la_asked; /* last time we QUERIED for this addr */ }; static LIST_HEAD(, llinfo_arp) llinfo_arp; @@ -432,6 +431,21 @@ */ if ((rt->rt_expire == 0 || rt->rt_expire > time_second) && sdl->sdl_family == AF_LINK && sdl->sdl_alen != 0) { + /* + * If entry has an expiry time and it is approaching, + * see if we need to send an ARP request within this + * arpt_down interval. + */ + if ((rt->rt_expire != 0) && + (time_second + (arp_maxtries - la->la_asked) * arpt_down > + rt->rt_expire)) { + arprequest(ifp, + &SIN(rt->rt_ifa->ifa_addr)->sin_addr, + &SIN(dst)->sin_addr, + IF_LLADDR(ifp)); + la->la_asked++; + } + bcopy(LLADDR(sdl), desten, sdl->sdl_alen); return 1; }