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 <ctype.h>
 #include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
 #include <string.h>
 
 /*
@@ -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: [EMAIL PROTECTED]                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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to