From owner-freebsd-current Mon Jul 2 8:26:17 2001 Delivered-To: freebsd-current@freebsd.org Received: from harrier.mail.pas.earthlink.net (harrier.mail.pas.earthlink.net [207.217.121.12]) by hub.freebsd.org (Postfix) with ESMTP id 6F47C37B401 for ; Mon, 2 Jul 2001 08:26:13 -0700 (PDT) (envelope-from cjc@earthlink.net) Received: from blossom.cjclark.org (dialup-209.245.142.69.Dial1.SanJose1.Level3.net [209.245.142.69]) by harrier.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id IAA24420; Mon, 2 Jul 2001 08:26:01 -0700 (PDT) Received: (from cjc@localhost) by blossom.cjclark.org (8.11.4/8.11.3) id f62FPck00691; Mon, 2 Jul 2001 08:25:38 -0700 (PDT) (envelope-from cjc) Date: Mon, 2 Jul 2001 08:25:38 -0700 From: "Crist J. Clark" To: David Malone Cc: David Hill , freebsd-current@FreeBSD.ORG Subject: Re: syslogd and -a Message-ID: <20010702082538.B448@blossom.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <20010701234125.7a7d3e3a.djhill@novagate.net> <20010701212044.Q296@blossom.cjclark.org> <20010702093842.A13480@walton.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010702093842.A13480@walton.maths.tcd.ie>; from dwmalone@maths.tcd.ie on Mon, Jul 02, 2001 at 09:38:42AM +0100 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 Mon, Jul 02, 2001 at 09:38:42AM +0100, David Malone wrote: > On Sun, Jul 01, 2001 at 09:20:44PM -0700, Crist J. Clark wrote: > > Hmmm... Looks like, > > > > # syslogd -a 192.168.1.0/29 > > > > Will work and, > > > > # syslogd -a 192.168.1.1/29 > > > > Won't. > > That's the standard behaviour of a netmask, isn't it? The usual > way to check if host h is in network/netmask n/m is to check if: > > (h & m == n) > > this means that the bits of the network which are not in the mask > must be zero. That's exactly what happens in the syslogd(8) code. However, I think that should be, n &= m . . . ((h & m) == n) That is, why allow the user to enter a network number that is not /really/ the network number? Either flag an error or do the calculation for the user. I think doing the calculation is the more sensible choice. Commiting it to CURRENT now. -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message