From owner-freebsd-current Tue Jan 14 2:18: 8 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CDC0537B401 for ; Tue, 14 Jan 2003 02:18:06 -0800 (PST) Received: from relay1.macomnet.ru (relay1.macomnet.ru [195.128.64.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AC1643F13 for ; Tue, 14 Jan 2003 02:18:05 -0800 (PST) (envelope-from maxim@macomnet.ru) Received: from news1.macomnet.ru (news1.macomnet.ru [195.128.64.14]) by relay1.macomnet.ru (8.11.6/8.11.6) with ESMTP id h0EAI2V8701030; Tue, 14 Jan 2003 13:18:02 +0300 (MSK) Date: Tue, 14 Jan 2003 13:18:02 +0300 (MSK) From: Maxim Konovalov To: Wiktor Niesiobedzki Cc: current@FreeBSD.ORG Subject: Re: IPFW2 skipto + logging In-Reply-To: <20030113162056.GB6882@mail.evip.pl> Message-ID: <20030114131710.W67685@news1.macomnet.ru> References: <20021110173443.A5529@mail.evip.pl> <20030112165156.G22175@news1.macomnet.ru> <20030113162056.GB6882@mail.evip.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 17:20+0100, Jan 13, 2003, Wiktor Niesiobedzki wrote: > On Sun, Jan 12, 2003 at 04:52:53PM +0300, Maxim Konovalov wrote: > > > > Hello, > > > > Please try a next patch: > > > It seems, that now logging with skipto is working correctly (I get expected > results), but funny thing, when there is no log rule, the skipto command won't > work. Yes, my bad. Corrected patch: Index: sys/netinet/ip_fw2.c =================================================================== RCS file: /home/ncvs/src/sys/netinet/ip_fw2.c,v retrieving revision 1.22 diff -u -r1.22 ip_fw2.c --- sys/netinet/ip_fw2.c 27 Dec 2002 17:43:25 -0000 1.22 +++ sys/netinet/ip_fw2.c 14 Jan 2003 10:16:30 -0000 @@ -1180,6 +1180,8 @@ /* look for action, in case it is a skipto */ cmd = ACTION_PTR(me); + if (cmd->opcode == O_LOG) + cmd += F_LEN(cmd); if ( cmd->opcode == O_SKIPTO ) for (rule = me->next; rule ; rule = rule->next) if (rule->rulenum >= cmd->arg1) %%% -- Maxim Konovalov, MAcomnet, Internet Dept., system engineer phone: +7 (095) 796-9079, mailto:maxim@macomnet.ru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message