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 [EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message