]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Miscellaneous bug fixes for ntp_io.c support
authorDanny Mayer <mayer@ntp.org>
Fri, 17 Jan 2003 06:34:09 +0000 (01:34 -0500)
committerDanny Mayer <mayer@ntp.org>
Fri, 17 Jan 2003 06:34:09 +0000 (01:34 -0500)
bk: 3e27a3e1dbLgTcD0gY6tzTUDMU1_Mg

include/isc/net.h
ntpd/ntp_io.c

index 4c1f3b992d9a0ce2a5a835366c9b9b50952f3337..8b2e37faba81ef7dfe458a2081a5c757ae82e3ca 100644 (file)
 #define INADDR_LOOPBACK 0x7f000001UL
 #endif
 
+#if 0
 #ifndef ISC_PLATFORM_HAVEIN6PKTINFO
 struct in6_pktinfo {
        struct in6_addr ipi6_addr;    /* src/dst IPv6 address */
        unsigned int    ipi6_ifindex; /* send/recv interface index */
 };
 #endif
+#endif
 
 /*
  * Cope with a missing in6addr_any and in6addr_loopback.
index 781399c678de7b11bf33871d557e09fa737375ed..be1bceb190584a357d442bffc5e891b07fb66f77 100644 (file)
@@ -136,7 +136,9 @@ ISC_LIST(vsock_t)   sockets_list;
 
 void add_socket_to_list(SOCKET fd);
 void delete_socket_from_list(SOCKET fd);
-
+int create_wildcards(u_short port);
+BOOL address_okay(isc_interface_t *isc_if);
+void convert_isc_if(isc_interface_t *isc_if, struct interface *itf, u_short port);
 
 /*
  * init_io - initialize I/O data structures and call socket creation routine
@@ -280,7 +282,7 @@ convert_isc_if(isc_interface_t *isc_if, struct interface *itf, u_short port) {
                       sizeof(struct in_addr));
                ((struct sockaddr_in*)&itf->mask)->sin_port = port;
 
-               if ((isc_if->flags & INTERFACE_F_LOOPBACK != 0) && (loopback_interface == NULL))
+               if (((isc_if->flags & INTERFACE_F_LOOPBACK) != 0) && (loopback_interface == NULL))
                {
                        loopback_interface = itf;
                }
@@ -309,7 +311,7 @@ convert_isc_if(isc_interface_t *isc_if, struct interface *itf, u_short port) {
                       sizeof(struct in6_addr));
                ((struct sockaddr_in6 *)&itf->mask)->sin6_port = port;
 
-               if ((isc_if->flags & INTERFACE_F_LOOPBACK != 0) && (loopback6_interface == NULL))
+               if (((isc_if->flags & INTERFACE_F_LOOPBACK) != 0) && (loopback6_interface == NULL))
                {
                        loopback6_interface = itf;
                }
@@ -775,7 +777,7 @@ io_multicast_del(
                                /* We are sharing "any address" port :-(  Don't close it! */
                                if (setsockopt(inter_list[i].fd, IPPROTO_IP, IP_DROP_MEMBERSHIP,
                                        (char *)&mreq, sizeof(mreq)) == -1)
-                               netsyslog(LOG_ERR, "setsockopt IP_DROP_MEMBERSHIP fails on address: %m",
+                               netsyslog(LOG_ERR, "setsockopt IP_DROP_MEMBERSHIP fails on address: %s %m",
                                        stoa(&addr));
                                /* This is **WRONG** -- there may be others ! */
                                /* There should be a count of users ... */
@@ -866,7 +868,7 @@ open_socket(
        /* create a datagram (UDP) socket */
 #ifndef SYS_WINNT
        if (  (fd = socket(addr->ss_family, SOCK_DGRAM, 0)) < 0) {
-               errval = errno
+               errval = errno;
                if(addr->ss_family == AF_INET)
                        netsyslog(LOG_ERR, "socket(AF_INET, SOCK_DGRAM, 0) failed on address %s: %m",
                                stoa(addr));