From f2bb89e063b90afc60f9711fb7e86c220e354b40 Mon Sep 17 00:00:00 2001 From: glebius Date: Mon, 6 Dec 2010 09:39:36 +0000 Subject: Catch up with kernel using time_uptime to drive ARP timeouts. Noticed by: jilles --- libexec/bootpd/rtmsg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libexec/bootpd') diff --git a/libexec/bootpd/rtmsg.c b/libexec/bootpd/rtmsg.c index b691edc..8b81dab 100644 --- a/libexec/bootpd/rtmsg.c +++ b/libexec/bootpd/rtmsg.c @@ -126,7 +126,7 @@ int bsd_arp_set(ia, eaddr, len) register struct sockaddr_dl *sdl; register struct rt_msghdr *rtm = &(m_rtmsg.m_rtm); u_char *ea; - struct timeval time; + struct timespec tp; int op = RTM_ADD; getsocket(); @@ -140,8 +140,8 @@ int bsd_arp_set(ia, eaddr, len) doing_proxy = flags = export_only = expire_time = 0; /* make arp entry temporary */ - gettimeofday(&time, 0); - expire_time = time.tv_sec + 20 * 60; + clock_gettime(CLOCK_MONOTONIC, &tp); + expire_time = tp.tv_sec + 20 * 60; tryagain: if (rtmsg(RTM_GET) < 0) { -- cgit v1.1