From owner-freebsd-bugs Thu Jul 27 10: 6:33 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from mail.rdc1.il.home.com (ha1.rdc1.il.home.com [24.2.1.66]) by hub.freebsd.org (Postfix) with ESMTP id 9043537B57F; Thu, 27 Jul 2000 10:06:25 -0700 (PDT) (envelope-from stephen@math.missouri.edu) Received: from math.missouri.edu ([24.12.197.197]) by mail.rdc1.il.home.com (InterMail vM.4.01.03.00 201-229-121) with ESMTP id <20000727170624.RCHC23923.mail.rdc1.il.home.com@math.missouri.edu>; Thu, 27 Jul 2000 10:06:24 -0700 Message-ID: <39806C10.4E38370C@math.missouri.edu> Date: Thu, 27 Jul 2000 12:06:24 -0500 From: Stephen Montgomery-Smith X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.14 i686) X-Accept-Language: en MIME-Version: 1.0 To: Neil Blakey-Milner Cc: sheldonh@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: kern/20198: log setup of dynamic rules for ipfw References: <200007271132.EAA88124@freefall.freebsd.org> <398053F2.DF9E3C5C@math.missouri.edu> <20000727172843.A48935@mithrandr.moria.org> <3980577F.BEC37786@math.missouri.edu> <20000727175112.A49474@mithrandr.moria.org> Content-Type: multipart/mixed; boundary="------------CC956E7E3750E59FCE350FBF" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multi-part message in MIME format. --------------CC956E7E3750E59FCE350FBF Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit OK, how about this: Neil Blakey-Milner wrote: > > On Thu 2000-07-27 (10:38), Stephen Montgomery-Smith wrote: > > > > add pass log logamount 10 from any to any 22 keep-state > > > > > > What about: > > > > > > add pass log logamount 10 from any to any 22 setup keep-state > > > > > > > That doesn't seem to work for me. > > Then that is the problem. No need to add new semantics when the above > is the obvious way it should function. If you can determine why it > doesn't work, then that's the fix. > --------------CC956E7E3750E59FCE350FBF Content-Type: text/plain; charset=us-ascii; name="ddd" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ddd" --- /sys/netinet/ip_fw.c Sat Jul 15 19:25:45 2000 +++ sys/netinet/ip_fw.c Thu Jul 27 11:47:19 2000 @@ -1215,8 +1215,18 @@ f->timestamp = time_second; /* Log to console if desired */ +#if STATEFUL + if ((f->fw_flg & IP_FW_F_PRN) && + /* Don't log for dynamic rules with keep state */ + !((f->fw_flg & IP_FW_F_KEEP_S) && q != NULL) && + fw_verbose) { + ipfw_report(f, ip, rif, oif); + } + +#else if ((f->fw_flg & IP_FW_F_PRN) && fw_verbose) ipfw_report(f, ip, rif, oif); +#endif /* Take appropriate action */ switch (f->fw_flg & IP_FW_F_COMMAND) { --------------CC956E7E3750E59FCE350FBF-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message