[Git][NTPsec/ntpsec][master] 2 commits: Solaris: Start to fix a893edc7fa5fdf05b7558c46b2e83db9c7a0881b

Gary E. Miller gitlab at mg.gitlab.com
Wed Jun 7 23:11:03 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
7445a835 by Gary E. Miller at 2017-06-07T14:35:56-07:00
Solaris: Start to fix a893edc7fa5fdf05b7558c46b2e83db9c7a0881b

That commit removed USE_PACKET_TIMESTAMP, but the alternate
Solaris path broke.  Solaris msghdr has not msg_flag, msg_control, or
msg_controllen.

- - - - -
e9e7205f by Gary E. Miller at 2017-06-07T16:10:27-07:00
libisc: remove code in $ifdef __hpux

NTPsec is POSIX only.

- - - - -


2 changed files:

- libisc/interfaceiter.c
- ntpd/ntp_io.c


Changes:

=====================================
libisc/interfaceiter.c
=====================================
--- a/libisc/interfaceiter.c
+++ b/libisc/interfaceiter.c
@@ -947,23 +947,6 @@ getbuf6(isc_interfaceiter_t *iter) {
                  */
                 if (isc_ioctl(iter->socket6, SIOCGLIFCONF, (char *)&iter->lifc)
                     == -1) {
-#ifdef __hpux
-                        /*
-                         * IPv6 interface scanning is not available on all
-                         * kernels w/ IPv6 sockets.
-                         */
-                        if (errno == ENOENT) {
-                                strerror_r(errno, strbuf, sizeof(strbuf));
-                                isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
-                                              ISC_LOGMODULE_INTERFACE,
-                                              ISC_LOG_DEBUG(1),
-                                                        "get interface "
-                                                        "configuration: %s",
-                                               strbuf);
-                                result = ISC_R_FAILURE;
-                                goto cleanup;
-                        }
-#endif
                         if (errno != EINVAL) {
                                 strerror_r(errno, strbuf, sizeof(strbuf));
                                 UNEXPECTED_ERROR("get interface "


=====================================
ntpd/ntp_io.c
=====================================
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -2322,11 +2322,13 @@ read_network_packet(
 
 	iovec.iov_base        = &rb->recv_space;
 	iovec.iov_len         = sizeof(rb->recv_space);
+	zero_mem(&msghdr, sizeof(msghdr));
 	msghdr.msg_name       = &rb->recv_srcadr;
 	msghdr.msg_namelen    = fromlen;
 	msghdr.msg_iov        = &iovec;
 	msghdr.msg_iovlen     = 1;
-	msghdr.msg_flags      = 0;
+	/* msghdr.msg_flags   = 0; Not all msghdr have msg_flags: Solaris */
+        /* Solaris does not have the next two */
 	msghdr.msg_control    = (void *)&control;
 	msghdr.msg_controllen = sizeof(control);
 	buflen                = recvmsg(fd, &msghdr, 0);



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/a57ec5cdfc5cafae16e00f26abb2cfe6b1e29e76...e9e7205ffba934e339ecea41fadb75f2769084a5

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/a57ec5cdfc5cafae16e00f26abb2cfe6b1e29e76...e9e7205ffba934e339ecea41fadb75f2769084a5
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/20170607/19242ef0/attachment.html>


More information about the vc mailing list