From 120de36b05be169478de442321de6a656d92be9d Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 8 Sep 2016 14:25:20 +1000 Subject: [PATCH] 4466. [bug] Interface scanning didn't work on a Windows system without a non local IPv6 addresses. [RT #43130] (cherry picked from commit 61ca100b80ae5ef271219fa9468f0cfde9d64fb8) --- CHANGES | 3 +++ lib/isc/win32/interfaceiter.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 501b6ce146..a9d21962a2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4466. [bug] Interface scanning didn't work on a Windows system + without a non local IPv6 addresses. [RT #43130] + 4464. [bug] Fix windows python support. [RT #43173] 4461. [bug] win32: not all external data was properly marked diff --git a/lib/isc/win32/interfaceiter.c b/lib/isc/win32/interfaceiter.c index 8f1eef2e50..a8711c42bb 100644 --- a/lib/isc/win32/interfaceiter.c +++ b/lib/isc/win32/interfaceiter.c @@ -384,7 +384,7 @@ internal_current6(isc_interfaceiter_t *iter) { memset(&iter->current, 0, sizeof(iter->current)); iter->current.af = AF_INET6; - if (iter->pos6 != 0U || !iter->pos6zero) { + if (!iter->pos6zero) { if (iter->pos6 == 0U) iter->pos6zero = ISC_TRUE; get_addr(AF_INET6, &iter->current.address, @@ -475,9 +475,9 @@ internal_next(isc_interfaceiter_t *iter) { static isc_result_t internal_next6(isc_interfaceiter_t *iter) { - if (iter->pos6 == 0 && iter->v6loop) + if (iter->pos6 == 0U && iter->v6loop) return (ISC_R_NOMORE); - if (iter->pos6 != 0) + if (iter->pos6 != 0U) iter->pos6--; return (ISC_R_SUCCESS); } @@ -498,7 +498,7 @@ isc_interfaceiter_first(isc_interfaceiter_t *iter) { if (iter->buf6 != NULL) { iter->pos6 = iter->buf6->iAddressCount; iter->v6loop = ISC_FALSE; - iter->pos6zero = ISC_FALSE; + iter->pos6zero = ISC_TF(iter->pos6 == 0U); } iter->result = ISC_R_SUCCESS; return (isc_interfaceiter_next(iter));