]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- The !inet_pton() call in res_mkupdrec was adjusted to '<= 0' as
authorDavid Hankins <dhankins@isc.org>
Mon, 3 Nov 2008 21:39:31 +0000 (21:39 +0000)
committerDavid Hankins <dhankins@isc.org>
Mon, 3 Nov 2008 21:39:31 +0000 (21:39 +0000)
  inet_pton returns either 1, 0, or -1. [ISC-Bugs #18511]

RELNOTES
minires/res_mkupdate.c

index b8781fb363f11e1a0f3dd6576abc3fa0c192a9ed..43f9ceb2f060214543d6be551504bf81c00e06f1 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -72,6 +72,9 @@ work on other platforms. Please report any problems and suggested fixes to
   some problems to some failover installations.  We will revisit this
   in future releases.
 
+- The !inet_pton() call in res_mkupdrec was adjusted to '<= 0' as
+  inet_pton returns either 1, 0, or -1.
+
                        Changes since 4.1.0a1
 
 - Corrected list of failover state values in dhcpd man page.
index 368bcb055ffcb0c10c0fe10ba31faba601b70617..16d9829ccf56f5d9361b98b936c94f9de9c8e645 100644 (file)
@@ -27,7 +27,7 @@
  */
 
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_mkupdate.c,v 1.12 2008/02/28 21:21:56 dhankins Exp $";
+static const char rcsid[] = "$Id: res_mkupdate.c,v 1.13 2008/11/03 21:39:31 dhankins Exp $";
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -239,7 +239,7 @@ res_nmkupdate(res_state statp,
                case T_AAAA:
                        if (!getword_str(buf2, sizeof buf2, &startp, endp))
                                return (-1);
-                       if (!inet_pton(AF_INET6, buf2, &in6a))
+                       if (inet_pton(AF_INET6, buf2, &in6a) <= 0)
                                return (-1);
                        n = sizeof(struct in6_addr);
                        memcpy(cp, &in6a, n);