From owner-freebsd-ipfw@FreeBSD.ORG Wed Sep 10 19:10:15 2003 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96D4516A4BF for ; Wed, 10 Sep 2003 19:10:15 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2833D43F93 for ; Wed, 10 Sep 2003 19:10:15 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h8B2AFUp088278 for ; Wed, 10 Sep 2003 19:10:15 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h8B2AEvc088277; Wed, 10 Sep 2003 19:10:14 -0700 (PDT) Date: Wed, 10 Sep 2003 19:10:14 -0700 (PDT) Message-Id: <200309110210.h8B2AEvc088277@freefall.freebsd.org> To: ipfw@FreeBSD.org From: Don Bowman Subject: Re: kern/55984: [patch] time based firewalling support for ipfw2 X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Don Bowman List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2003 02:10:15 -0000 The following reply was made to PR kern/55984; it has been noted by GNATS. From: Don Bowman To: 'gnats' Cc: Subject: Re: kern/55984: [patch] time based firewalling support for ipfw2 Date: Wed, 10 Sep 2003 22:03:59 -0400 suggest using 'time_second' instead of microtime() in ipfw_chk(). case O_TIME: { u_long from, to, sum; long tzoff; tzoff = ((ipfw_insn_time *)cmd)->tzoff; from = ((ipfw_insn_time *)cmd)->from; to = ((ipfw_insn_time *)cmd)->to; sum = ipfw_calc_time_sum(time_second + t zoff); match = (sum >= from && sum <= to); } break;