Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Dec 2010 09:39:37 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r216226 - head/libexec/bootpd
Message-ID:  <201012060939.oB69db2F027663@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Mon Dec  6 09:39:36 2010
New Revision: 216226
URL: http://svn.freebsd.org/changeset/base/216226

Log:
  Catch up with kernel using time_uptime to drive ARP timeouts.
  
  Noticed by:	jilles

Modified:
  head/libexec/bootpd/rtmsg.c

Modified: head/libexec/bootpd/rtmsg.c
==============================================================================
--- head/libexec/bootpd/rtmsg.c	Mon Dec  6 09:37:56 2010	(r216225)
+++ head/libexec/bootpd/rtmsg.c	Mon Dec  6 09:39:36 2010	(r216226)
@@ -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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012060939.oB69db2F027663>