bk: 504d20a2NxRHMH4VTdnTO_0TKca3ew
+* [Bug 2271] Decode refclock types when built with --disable-all-clocks.
(4.2.7p304) 2012/09/06 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2264] Cleanup SEL240X Refclock.
* In refclock_wwv.c rename SECOND to WWV_SEC and MINUTE to WWV_MIN.
#define REFCLOCK_ADDR 0x7f7f0000 /* 127.127.0.0 */
#define REFCLOCK_MASK 0xffff0000 /* 255.255.0.0 */
-#ifdef REFCLOCK
#define ISREFCLOCKADR(srcadr) \
(IS_IPV4(srcadr) && \
(SRCADR(srcadr) & REFCLOCK_MASK) == REFCLOCK_ADDR)
-#else
-#define ISREFCLOCKADR(srcadr) (0)
-#endif
/*
* Macro for checking for invalid addresses. This is really, really
peer->timereachable = current_time;
peer->timereceived = current_time;
-#ifdef REFCLOCK
if (ISREFCLOCKADR(&peer->srcadr)) {
-
+#ifdef REFCLOCK
/*
* We let the reference clock support do clock
* dependent initialization. This includes setting
free_peer(peer, 0);
return NULL;
}
+#else /* REFCLOCK */
+ msyslog(LOG_ERR, "refclock %s isn't supported. ntpd was compiled without refclock support.",
+ stoa(&peer->srcadr));
+ set_peerdstadr(peer, NULL);
+ free_peer(peer, 0);
+ return NULL;
+#endif /* REFCLOCK */
}
-#endif
/*
* Put the new peer in the hash tables.