diff options
author | andre <andre@FreeBSD.org> | 2005-09-19 22:54:55 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2005-09-19 22:54:55 +0000 |
commit | b1aa5bb640247072fc8d1d7048d185f1394ada0e (patch) | |
tree | 367e738ce0debc500f889e7881a2f0024d561920 /sys/netinet/if_ether.c | |
parent | c4178ac83e7a9df4a8066ef58796d8b474a13d06 (diff) | |
download | FreeBSD-src-b1aa5bb640247072fc8d1d7048d185f1394ada0e.zip FreeBSD-src-b1aa5bb640247072fc8d1d7048d185f1394ada0e.tar.gz |
Use monotonic 'time_uptime' instead of 'time_second' as timebase
for rt->rt_rmx.rmx_expire.
Diffstat (limited to 'sys/netinet/if_ether.c')
-rw-r--r-- | sys/netinet/if_ether.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 24c8b98..e5d1073 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -144,7 +144,7 @@ arptimer(void * __unused unused) struct rtentry *rt = la->la_rt; RT_LOCK(rt); - if (rt->rt_expire && rt->rt_expire <= time_second) { + if (rt->rt_expire && rt->rt_expire <= time_uptime) { struct sockaddr_dl *sdl = SDL(rt->rt_gateway); KASSERT(sdl->sdl_family == AF_LINK, ("sdl_family %d", @@ -213,7 +213,7 @@ arp_rtrequest(req, rt, info) gate = rt->rt_gateway; SDL(gate)->sdl_type = rt->rt_ifp->if_type; SDL(gate)->sdl_index = rt->rt_ifp->if_index; - rt->rt_expire = time_second; + rt->rt_expire = time_uptime; break; } /* Announce a new entry if requested. */ @@ -443,7 +443,7 @@ arpresolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m, * Check the address family and length is valid, the address * is resolved; otherwise, try to resolve. */ - if ((rt->rt_expire == 0 || rt->rt_expire > time_second) && + if ((rt->rt_expire == 0 || rt->rt_expire > time_uptime) && sdl->sdl_family == AF_LINK && sdl->sdl_alen != 0) { bcopy(LLADDR(sdl), desten, sdl->sdl_alen); @@ -454,7 +454,7 @@ arpresolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m, * arpt_down interval. */ if ((rt->rt_expire != 0) && - (time_second + la->la_preempt > rt->rt_expire)) { + (time_uptime + la->la_preempt > rt->rt_expire)) { struct in_addr sin = SIN(rt->rt_ifa->ifa_addr)->sin_addr; @@ -489,8 +489,8 @@ arpresolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m, la->la_hold = m; if (rt->rt_expire) { rt->rt_flags &= ~RTF_REJECT; - if (la->la_asked == 0 || rt->rt_expire != time_second) { - rt->rt_expire = time_second; + if (la->la_asked == 0 || rt->rt_expire != time_uptime) { + rt->rt_expire = time_uptime; if (la->la_asked++ < arp_maxtries) { struct in_addr sin = SIN(rt->rt_ifa->ifa_addr)->sin_addr; @@ -787,7 +787,7 @@ match: th->rcf = trld->trld_rcf; } if (rt->rt_expire) - rt->rt_expire = time_second + arpt_keep; + rt->rt_expire = time_uptime + arpt_keep; rt->rt_flags &= ~RTF_REJECT; la->la_asked = 0; la->la_preempt = arp_maxtries; |