]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Make IPv6 multicasting work.
authorJohn Hay <hay@ntp.org>
Sat, 20 Oct 2001 10:55:32 +0000 (12:55 +0200)
committerJohn Hay <hay@ntp.org>
Sat, 20 Oct 2001 10:55:32 +0000 (12:55 +0200)
bk: 3bd158249X_ILj-kbI5k-tOxo_4_tQ

ntpd/ntp_io.c

index c407f74e8d0ad3394ccd06eac106dbf03d4d2a99..1132a5b736995d0ae9122d7b415a9ae6cf36ffc7 100644 (file)
@@ -917,9 +917,9 @@ io_multicast_add(
 
                iaddr6 = ((struct sockaddr_in6*)&addr)->sin6_addr;
                memcpy(&haddr6, &(((struct sockaddr_in6*)&addr)->sin6_addr.s6_addr), sizeof(struct in6_addr));
-               if (IN6_IS_ADDR_MULTICAST(&iaddr6)) {
+               if (!IN6_IS_ADDR_MULTICAST(&iaddr6)) {
                        msyslog(LOG_ERR,
-                           "multicast address %s not class D",
+                           "address %s not IPv6 multicast address",
                                stoa(&addr));
                        return;
                }
@@ -947,7 +947,7 @@ io_multicast_add(
                 * Try opening a socket for the specified class D address. This
                 * works under SunOS 4.x, but not OSF1 .. :-(
                 */
-               s = open_socket((struct sockaddr_storage*)&sin6p, 0, 1);
+               s = open_socket((struct sockaddr_storage*)sin6p, 0, 1);
                if (s < 0) {
                        memset((char *)&inter_list[i], 0, sizeof inter_list[0]);
                        i = 0;