From owner-freebsd-current Tue Nov 2 18: 6:55 1999 Delivered-To: freebsd-current@freebsd.org Received: from marcos.networkcs.com (marcos.networkcs.com [137.66.16.1]) by hub.freebsd.org (Postfix) with ESMTP id E36BF14D50 for ; Tue, 2 Nov 1999 18:06:52 -0800 (PST) (envelope-from mks@us.networkcs.com) Received: from us.networkcs.com (us.networkcs.com [137.66.11.15]) by marcos.networkcs.com (8.9.3/8.9.3) with ESMTP id UAA94300; Tue, 2 Nov 1999 20:06:51 -0600 (CST) (envelope-from mks@us.networkcs.com) Received: (from mks@localhost) by us.networkcs.com (8.9.2/8.8.7) id UAA39981; Tue, 2 Nov 1999 20:06:51 -0600 (CST) From: Mike Spengler Message-Id: <199911030206.UAA39981@us.networkcs.com> Subject: Re: named.conf oddity In-Reply-To: <19991103001355.A281@daemon.ninth-circle.org> from Jeroen Ruigrok/Asmodai at "Nov 3, 99 00:13:55 am" To: asmodai@wxs.nl (Jeroen Ruigrok/Asmodai) Date: Tue, 2 Nov 1999 20:06:51 -0600 (CST) Cc: current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jeroen Ruigrok/Asmodai said: > > Nov 3 00:07:44 daemon named[481]: /etc/dns/named.conf:4: syntax error > near '195.121.1.34' > Nov 3 00:07:44 daemon named[481]: /etc/dns/named.conf:7: syntax error > near '}' > > I start named with -b /etc/dns/named.conf > > And this is my, working for the last half year named.conf: > > options { > directory "/etc/dns"; > forwarders { > 195.121.1.34; > 195.121.1.66; > }; > }; It seems a recent update to lib/libc/net/inet_addr.c is the culprit here. Any IP address with a component of 34 will fail in inet_aton(). Here's a patch that should fix it up: Index: inet_addr.c =================================================================== RCS file: /home/ncvs/src/lib/libc/net/inet_addr.c,v retrieving revision 1.9 diff -u -r1.9 inet_addr.c --- inet_addr.c 1999/10/31 04:43:55 1.9 +++ inet_addr.c 1999/11/03 02:01:52 @@ -65,6 +65,8 @@ #include #include +#include +#include #include /* @@ -98,7 +100,7 @@ u_long val; char *c; char *endptr; - int base, gotend, n; + int gotend, n; c = (char *)cp; n = 0; @@ -111,8 +113,10 @@ errno = 0; val = strtoul(c, &endptr, 0); - if (val == ERANGE) /* Fail completely if it overflowed. */ + if ((val == ULONG_MAX) && (errno == ERANGE)) { + /* Fail completely if it overflowed. */ return (0); + } /* * If the whole string is invalid, endptr will equal -- Mike Spengler Network Computing Services, Inc. Email: mks@networkcs.com 1200 Washington Ave. So. Phone: +1 612 337 3557 Minneapolis MN 55415 FAX: +1 612 337 3400 (aka Minnesota Supercomputer Center) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message