From: Dave Hart Date: Mon, 15 Jun 2009 04:20:40 +0000 (+0000) Subject: Merge bk://www.ntp.org/ntp-dev X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09b9755ea39d19a65813d1f82ec5fb14eb105528;p=thirdparty%2Fntp.git Merge bk://www.ntp.org/ntp-dev 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 --- 09b9755ea39d19a65813d1f82ec5fb14eb105528 diff --cc ChangeLog index e8a4ade80c,b4dc57a21f..1976d0eb5c --- a/ChangeLog +++ 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 +* [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 +* [Bug 1200] Enable IPv6 in Windows port +* Lose FLAG_FIXPOLL, from Dave Mills. +(4.2.5p179) 2009/05/23 Released by Harlan Stenn * [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 1c4b6ae10b,6872d3eb94..7c5821ca03 --- a/include/ntp.h +++ b/include/ntp.h @@@ -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 */ }; diff --cc ntpd/ntp_io.c index 0cd03b9f0a,898c4c2b96..0c6239dd25 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@@ -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 ports/winnt/ntpd/ntp_iocompletionport.c index 5be1071694,3201d8ce51..9673b1839e --- a/ports/winnt/ntpd/ntp_iocompletionport.c +++ b/ports/winnt/ntpd/ntp_iocompletionport.c @@@ -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;