]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Fixes to deal with bug #37 and fix for non-IPv6 stack machines to deal with IPv6...
authorDanny Mayer <mayer@ntp.org>
Sat, 26 Apr 2003 04:07:53 +0000 (00:07 -0400)
committerDanny Mayer <mayer@ntp.org>
Sat, 26 Apr 2003 04:07:53 +0000 (00:07 -0400)
bk: 3eaa0619c0R3ziKespZI6OBHnoMsbA

libntp/socktoa.c
ntpd/ntp_request.c
ports/winnt/include/config.h

index 39d32c4a824eb0d93801f1049f29e366111eb0c7..34de7848a4c02468a462f091cfbba6c3c32a5338 100644 (file)
@@ -1,13 +1,8 @@
 /*
  * socktoa - return a numeric host name from a sockaddr_storage structure
  */
-#ifdef SYS_WINNT
-/* Skip asynch rpc inclusion */
-#ifndef __RPCASYNC_H__
-#define __RPCASYNC_H__
-#endif
-#include <windows.h>
-#endif
+
+#include <config.h>
 
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -16,7 +11,7 @@
 
 #include <arpa/inet.h>
 
-#ifndef HAVE_IPV6
+#ifdef ISC_PLATFORM_NEEDNTOP
 #include <isc/net.h>
 #endif
 
index f825b5ff06f9d39e107a428dec8b7d077ff6cf07..73f9e372ade7285173cbae69a39e845d8095054c 100644 (file)
@@ -728,6 +728,7 @@ peer_list_sum(
                                ips->srcadr = GET_INADDR(pp->srcadr);
                                if (client_v6_capable)
                                        ips->v6_flag = 0;
+/* XXX This code is buggy. Replaced with a straightforward assignment
                                ips->dstadr = (pp->processed) ?
                                        pp->cast_flags == MDF_BCAST ?
                                        GET_INADDR(pp->dstadr->bcast):
@@ -736,6 +737,8 @@ peer_list_sum(
                                        GET_INADDR(pp->dstadr->sin):
                                        GET_INADDR(pp->dstadr->bcast):
                                        1 : 5;
+*/
+                               ips->dstadr = GET_INADDR(pp->dstadr->sin);
                                skip = 0;
                        }
                        if (!skip){ 
@@ -828,6 +831,7 @@ peer_info (
                        ip->srcadr6 = GET_INADDR6(pp->srcadr);
                        ip->v6_flag = 1;
                } else {
+/* XXX This code is buggy. Replaced with a straightforward assignment
                        ip->dstadr = (pp->processed) ?
                                pp->cast_flags == MDF_BCAST ?
                                GET_INADDR(pp->dstadr->bcast):
@@ -836,6 +840,8 @@ peer_info (
                                GET_INADDR(pp->dstadr->sin):
                                GET_INADDR(pp->dstadr->bcast):
                                2 : 6;
+*/
+                       ip->dstadr = GET_INADDR(pp->dstadr->sin);
                        ip->srcadr = GET_INADDR(pp->srcadr);
                        if (client_v6_capable)
                                ip->v6_flag = 0;
index 209fcaa854e064c2fec7e23f52d065bb372702d6..7566006b099d0b17241c8f94954344db79fa7dc2 100644 (file)
@@ -91,6 +91,7 @@ int NT_set_process_priority(void);    /* Define this function */
 # define TIME_WITH_SYS_TIME
 # define HAVE_IO_COMPLETION_PORT
 # define HAVE_SOCKADDR_IN6
+# define ISC_PLATFORM_NEEDNTOP
 
 # define NEED_S_CHAR_TYPEDEF