From owner-svn-src-all@FreeBSD.ORG Mon Dec 6 09:39:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FC6C106566B; Mon, 6 Dec 2010 09:39:37 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E9D38FC12; Mon, 6 Dec 2010 09:39:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oB69dbNQ027665; Mon, 6 Dec 2010 09:39:37 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oB69db2F027663; Mon, 6 Dec 2010 09:39:37 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201012060939.oB69db2F027663@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 6 Dec 2010 09:39:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216226 - head/libexec/bootpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Dec 2010 09:39:37 -0000 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) {