From owner-freebsd-bugs Tue Aug 10 6:22:39 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 2E6EB153E2 for ; Tue, 10 Aug 1999 06:22:38 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id GAA37214; Tue, 10 Aug 1999 06:20:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Tue, 10 Aug 1999 06:20:04 -0700 (PDT) Message-Id: <199908101320.GAA37214@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: adrian@freebsd.org Subject: Re: bin/12091 Reply-To: adrian@freebsd.org Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/12091; it has been noted by GNATS. From: adrian@freebsd.org To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: bin/12091 Date: Tue, 10 Aug 1999 21:13:37 +0800 There's a couple things you can do: Either be nice and give them a warning, or tell them they've messed up. I've done the former, and the submitted patch does the following: $ ./syslogd -a 1.1.1.1/24 Warning! IP '1.1.1.1' is not a valid network address to match subnet '255.255.255.0'. Changing to '1.1.1.0'. The logic is easy enough, from the code: /* * next, validate that the address is a valid network address * with the given netmask. You do this by ANDing the address * they've given us with the netmask, and if the result is the * same, you're clear, otherwise, print a warning. The reason * for this is that later on during the matching code, if someon * puts in 1.2.3.4/24 in instead of 1.2.3.0/24, it'll never be * matched (PR bin/12091) */ If anyone thinks this should change to give them an error, tell me. Patch: http://www.freebsd.org/~adrian/syslogd.diff Adrian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message