From: David Hankins Date: Mon, 3 Nov 2008 21:39:31 +0000 (+0000) Subject: - The !inet_pton() call in res_mkupdrec was adjusted to '<= 0' as X-Git-Tag: v4_1_0b1~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f1672d89072ea5fef5589e085191f60728d0379b;p=thirdparty%2Fdhcp.git - The !inet_pton() call in res_mkupdrec was adjusted to '<= 0' as inet_pton returns either 1, 0, or -1. [ISC-Bugs #18511] --- diff --git a/RELNOTES b/RELNOTES index b8781fb36..43f9ceb2f 100644 --- 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. diff --git a/minires/res_mkupdate.c b/minires/res_mkupdate.c index 368bcb055..16d9829cc 100644 --- a/minires/res_mkupdate.c +++ b/minires/res_mkupdate.c @@ -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 @@ -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);