[Git][NTPsec/ntpsec][master] Another try at fixing issue #334

Hal Murray gitlab at mg.gitlab.com
Sat Jun 3 13:08:40 UTC 2017


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
1fad46d7 by Hal Murray at 2017-06-03T06:08:12-07:00
Another try at fixing issue #334

- - - - -


1 changed file:

- libntp/ntp_dns.c


Changes:

=====================================
libntp/ntp_dns.c
=====================================
--- a/libntp/ntp_dns.c
+++ b/libntp/ntp_dns.c
@@ -83,7 +83,6 @@ void dns_check(void)
 {
 	int rc;
 	struct addrinfo *ai;
-	sockaddr_u sockaddr;
 	DNS_Status status;
 
 	msyslog(LOG_INFO, "dns_check: processing %s, %x, %x",
@@ -101,8 +100,11 @@ void dns_check(void)
 	}
 
 	for (ai = answer; NULL != ai; ai = ai->ai_next) {
-		sockaddr.sa = *ai->ai_addr;
+		sockaddr_u sockaddr;
+		memcpy(&sockaddr, ai->ai_addr, ai->ai_addrlen);
 		/* Both dns_take_pool and dns_take_server log something. */
+		// msyslog(LOG_INFO, "DNS Take %s=>%s",
+		//		socktoa(ai->ai_addr), socktoa(&sockaddr));
 		if (active->cast_flags & MDF_POOL)
 			dns_take_pool(active, &sockaddr);
 		else



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/1fad46d7620cdfeb126e52214323a3c365ff1e55

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/1fad46d7620cdfeb126e52214323a3c365ff1e55
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170603/4fa2e86e/attachment.html>


More information about the vc mailing list