]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Merge bk://www.ntp.org/ntp-dev
authorDave Hart <hart@ntp.org>
Mon, 15 Jun 2009 04:20:40 +0000 (04:20 +0000)
committerDave Hart <hart@ntp.org>
Mon, 15 Jun 2009 04:20:40 +0000 (04:20 +0000)
into  shiny.ad.hartbrothers.com:C:/ntp/ntp-dev-sockaddr

3 weeks of changes including IPv6 on Windows which was
  cherry-picked from this repo

bk: 4a35cc18cNgr7kMvGsnA1no2LvLVWA

14 files changed:
1  2 
ChangeLog
include/ntp.h
libntp/decodenetnum.c
ntpd/ntp_config.c
ntpd/ntp_io.c
ntpd/ntp_peer.c
ntpd/ntp_proto.c
ntpd/ntp_refclock.c
ntpd/ntp_request.c
ntpd/refclock_nmea.c
ntpdc/ntpdc.c
ntpdc/ntpdc_ops.c
ntpq/ntpq.c
ports/winnt/ntpd/ntp_iocompletionport.c

diff --cc ChangeLog
index e8a4ade80c93acb37257c925ad90f0203a46ce0e,b4dc57a21f02a5b2df7d21dcce18d95ab2075735..1976d0eb5cae548befd39f53958c92dc463e89db
+++ b/ChangeLog
@@@ -1,15 -1,6 +1,18 @@@
+ * Use a union for structs sockaddr, sockaddr_storage, sockaddr_in, and
+   sockaddr_in6 to remove casts and enable type checking.  Collapse
+   some previously separate IPv4/IPv6 paths into a single codepath.
 +(4.2.5p181) 2009/06/06 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1206] Required compiler changes for Windows
 +* [Bug 1084] PPSAPI for ntpd on Windows with DLL backends
 +* [Bug 1204] Unix-style refclock device paths on Windows
 +* [Bug 1205] partial fix, disable RDTSC use by default on Windows
 +* [Bug 1208] decodenetnum() buffer overrun on [ with no ]
 +* [Bug 1211] keysdir free()d twice #ifdef DEBUG
 +* Enable ONCORE, ARCRON refclocks on Windows (untested)
 +(4.2.5p180) 2009/05/29 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1200] Enable IPv6 in Windows port
 +* Lose FLAG_FIXPOLL, from Dave Mills.
 +(4.2.5p179) 2009/05/23 Released by Harlan Stenn <stenn@ntp.org>
  * [Bug 1041] xmt -> aorg timestamp cleanup from Dave Mills,
    reported by Dave Hart.
  * [Bug 1193] Compile error: conflicting types for emalloc.
diff --cc include/ntp.h
index 1c4b6ae10bb9646987482dc2f9da1285bc275cf7,6872d3eb94c632eac67d3e8da5de05061c5c2d63..7c5821ca03f88feeec6959801f006aeb94ab04d1
@@@ -191,10 -192,11 +192,10 @@@ struct interface 
        long sent;                      /* number of outgoing packets */
        long notsent;                   /* number of send failures */
        u_int scopeid;                  /* Scope used for Multicasting */
 -      u_int ifindex;                  /* interface index */
        u_int ifnum;                    /* sequential interface instance count */
-       isc_boolean_t ignore_packets;   /* Specify whether the packet should be ignored */
+       isc_boolean_t ignore_packets;   /* listen-read-drop this? */
        ISC_LIST(struct peer) peers;    /* list of peers for the interface */
-       u_int peercnt;                  /* number of peers referencinf this interface - informational only */
+       u_int peercnt;                  /* peers referencing this interface */
        ISC_LINK(struct interface) link;/* interface list */
  };
  
Simple merge
Simple merge
diff --cc ntpd/ntp_io.c
index 0cd03b9f0aac95b0c6360ce67653eb854ea61b64,898c4c2b966501dfdffdd369d1dadd319701ea28..0c6239dd25ff94ebe7205934d3b93d117b0b637c
@@@ -516,9 -520,12 +520,12 @@@ init_io(void
  
        if (!Win32InitSockets())
        {
-               netsyslog(LOG_ERR, "No useable winsock.dll: %m");
+               msyslog(LOG_ERR, "No useable winsock.dll: %m");
                exit(1);
        }
 -#if 0                         /* transmitbuff code unused */
++# if 0                                /* transmitbuff code unused */
+       init_transmitbuff();
 -#endif
++# endif
  #endif /* SYS_WINNT */
  
        /*
@@@ -627,23 -631,26 +630,25 @@@ sockaddr_dump(sockaddr_u *psau
  static void
  print_interface(struct interface *iface, char *pfx, char *sfx)
  {
-       printf("%sinterface #%d: fd=%d, bfd=%d, name=%s, flags=0x%x, scope=%d",
 -      printf("%sinterface #%d: fd=%d, bfd=%d, name=%s, flags=0x%x, scope=%d, ifindex=%d, sin=%s",
++      printf("%sinterface #%d: fd=%d, bfd=%d, name=%s, flags=0x%x, scope=%d, sin=%s",
               pfx,
               iface->ifnum,
               iface->fd,
               iface->bfd,
               iface->name,
               iface->flags,
-              iface->scopeid);
-       printf(", sin=%s",
-              stoa((&iface->sin)));
-       if (iface->flags & INT_BROADCAST)
-               printf(", bcast=%s,",
-                      stoa((&iface->bcast)));
-       if (iface->family == AF_INET)
-         printf(", mask=%s",
-                stoa((&iface->mask)));
-       printf(", %s:%s", iface->ignore_packets == ISC_FALSE ? "Enabled" : "Disabled", sfx);
+              iface->scopeid,
 -             iface->ifindex,
+              stoa(&iface->sin));
+       if (AF_INET == iface->family) {
+               if (iface->flags & INT_BROADCAST)
+                       printf(", bcast=%s", stoa(&iface->bcast));
+               printf(", mask=%s", stoa(&iface->mask));
+       }
+       printf(", %s:%s",
+              (iface->ignore_packets) 
+                  ? "Disabled"
+                  : "Enabled",
+              sfx);
        if (debug > 4)  /* in-depth debugging only */
                interface_dump(iface);
  }
diff --cc ntpd/ntp_peer.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc ntpdc/ntpdc.c
Simple merge
Simple merge
diff --cc ntpq/ntpq.c
Simple merge
index 5be1071694238052972edf0fa945f29655093027,3201d8ce51f33207613519067f10bedbe91a1af8..9673b1839eb5c92c40ffdcc7370e10c57d58c3a0
@@@ -750,7 -744,7 +750,8 @@@ io_completion_port_sendto
        struct interface *inter,        
        struct pkt *pkt,        
        int len, 
-       struct sockaddr_storage *dest)
 -      sockaddr_u* dest)
++      sockaddr_u* dest
++      )
  {
        WSABUF wsabuf;
        transmitbuf_t *buff;