]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Automerge Dvae's recent changes from ntp-dev.
authorHarlan Stenn <stenn@ntp.org>
Mon, 31 Dec 2001 07:53:22 +0000 (02:53 -0500)
committerHarlan Stenn <stenn@ntp.org>
Mon, 31 Dec 2001 07:53:22 +0000 (02:53 -0500)
I probably broke something when doing the conflict resolution on
ntp_proto.c .

bk: 3c301972h7xwwqnF0gmcSqKMZRrXaA

1  2 
include/ntp.h
include/ntp_control.h
include/ntpd.h
ntpd/ntp_config.c
ntpd/ntp_control.c
ntpd/ntp_peer.c
ntpd/ntp_proto.c
ntpd/refclock_parse.c
ntpq/ntpq.c

diff --cc include/ntp.h
Simple merge
Simple merge
diff --cc include/ntpd.h
Simple merge
Simple merge
Simple merge
diff --cc ntpd/ntp_peer.c
index fda8a2466b328b200c383a6ccb2e9fc1f5335465,0d98266d553cb4150a77ebccf9f0bef2661e39be..f2f2336ffe778f187fa1b5d5c36efc29a25ffd83
@@@ -644,10 -626,10 +644,10 @@@ newpeer
        if (debug)
                printf(
                    "newpeer: %s->%s mode %d vers %d poll %d %d flags 0x%x 0x%x ttl %d key %08x\n",
 -                  ntoa(&peer->dstadr->sin), ntoa(&peer->srcadr),
 +                  stoa(&peer->dstadr->sin), stoa(&peer->srcadr),
                    peer->hmode, peer->version, peer->minpoll,
                    peer->maxpoll, peer->flags, peer->cast_flags,
-                   peer->ttlmax, peer->keyid);
+                   peer->ttl, peer->keyid);
  #endif
        return (peer);
  }
index bc1c2858fa84d9e2e9c05c62a17ec9d520df91c7,040ae615925856bc103a5f4f34311f98e653dfa2..0163f61c39ff78c051e93b49c03eba880339259d
@@@ -585,11 -595,11 +595,13 @@@ receive
                         */
                        if (sys_peer == NULL ||
                            PKT_TO_STRATUM(pkt->stratum) <
-                           sys_stratum ||
+                           sys_stratum || (sys_cohort &&
+                           PKT_TO_STRATUM(pkt->stratum) ==
+                           sys_stratum) ||
 -                          rbufp->dstadr->sin.sin_addr.s_addr ==
 -                          pkt->refid)
 +                          /* XXX How do I check IPv6 addresses ? */
 +                          (rbufp->dstadr->sin.ss_family == AF_INET &&
 +                          ((struct sockaddr_in*)&rbufp->dstadr->sin)->sin_addr.s_addr ==
 +                          pkt->refid))
                                return;
                }
  
@@@ -1920,34 -1956,9 +1959,8 @@@ clock_select(void
                nlist--;
        }
  
- #ifdef OPENSSL
-       /*
-        * In manycast client mode we may have spooked a sizeable number
-        * of peers that we don't need. If there are at least
-        * NTP_MINCLOCK of them, the manycast message will be turned
-        * off. By the time we get here we nay be ready to prune some of
-        * them back, but we want to make sure all the candicates have
-        * had a chance. If they didn't pass the sanity and intersection
-        * tests, they have already been voted off the island.
-        */
-       if (sys_survivors >= NTP_MINCLOCK && nlist < NTP_MINCLOCK)
-               resetmanycast();
- #endif /* OPENSSL */
-       sys_survivors = nlist;
- #ifdef DEBUG
-       if (debug > 1) {
-               for (i = 0; i < nlist; i++)
-                       printf(
-                           "select: %s offset %.6f, weight %.6f poll %d\n",
-                           stoa(&peer_list[i]->srcadr),
-                           peer_list[i]->offset, synch[i],
-                           peer_list[i]->pollsw);
-       }
- #endif
--
        /*
-        * What remains is a list of not greater than NTP_MINCLOCK
+        * What remains is a list usually not greater than sys_minclock
         * peers. We want only a peer at the lowest stratum to become
         * the system peer, although all survivors are eligible for the
         * combining algorithm. First record their order, diddle the
@@@ -2754,27 -2783,24 +2786,24 @@@ proto_config
                        io_unsetbclient();
                break;
  
+       /*
+        * Add muliticast group address.
+        */
        case PROTO_MULTICAST_ADD:
-               /*
-                * Add muliticast group address
-                */
 -              io_multicast_add(value);
 +              io_multicast_add(*svalue);
                break;
  
+       /*
+        * Delete multicast group address.
+        */
        case PROTO_MULTICAST_DEL:
-               /*
-                * Delete multicast group address
-                */
 -              io_multicast_del(value);
 +              io_multicast_del(*svalue);
                break;
  
+       /*
+        * Set default broadcast delay.
+        */
        case PROTO_BROADDELAY:
-               /*
-                * Set default broadcast delay
-                */
                sys_bdelay = dvalue;
                break;
  
Simple merge
diff --cc ntpq/ntpq.c
Simple merge