to local interfaces the default.
Emit a warning if that keyword is used for configuration.
bk: 4898063fMiN6k_W7dbnAB6X_u7t6Eg
+* [Bug 841] Obsolete the "dynamic" keyword and make deferred binding
+ to local interfaces the default.
+ Emit a warning if that keyword is used for configuration.
* [Bug 959] Refclock on Windows not properly releasing recvbuffs.
* [Bug 993] Fix memory leak when fetching system messages.
* [Bug 987] Wake up the resolver thread/process when a new interface has
<dd>This option is used only with broadcast server and manycast client modes. It specifies the time-to-live <i><tt>ttl</tt></i> to use on broadcast server and multicast server and the maximum <i><tt>ttl</tt></i> for the expanding ring search with manycast client packets. Selection of the proper value, which defaults to 127, is something of a black art and should be coordinated with the network administrator.
<dt><tt>version <i>version</i></tt>
<dd>Specifies the version number to be used for outgoing NTP packets. Versions 1-4 are the choices, with version 4 the default. This option is valid only with the <tt>server,</tt> <tt>peer</tt> and <tt>broadcast</tt> commands.
- <dt><tt>dynamic</tt>
- <dd>Allows a server/peer to be configured even if it is not reachable at configuration time. It is assumed that at some point in the future the network environment changes so that this server/peer can be reached. This option is useful to configure servers/peers on mobile systems with intermittent network access (e.g. wlan clients).
</dl>
<h4 id="aux">Auxilliary Commands</h4>
<dl>
<dt><tt>addpeer <i>peer_address</i> [
<i>keyid</i> ] [ <i>version</i> ] [
<tt>minpoll# | prefer | iburst | burst | minpoll
- <i>N</i> | <tt>maxpoll</tt> <i>N</i> [ <i>dynamic</i> ] [...] ]</tt>
+ <i>N</i> | <tt>maxpoll</tt> <i>N</i> [...] ]</tt>
<dt><tt>addpeer <i>peer_address</i> [
<tt>prefer | iburst | burst | minpoll
<i>N</i> | <tt>maxpoll</tt> <i>N</i> | <tt>keyid</tt>
ntpd. See the <a href="confopt.html">Server Options</a> page for further information.
Each flag (or its absence) replaces the
previous setting. The <tt>prefer</tt> keyword indicates a preferred peer (and thus will be used primarily for clock synchronisation if possible). The preferred peer also determines the validity of the PPS signal - if the preferred peer is suitable for synchronisation so is the PPS signal.
- The <tt>dynamic</tt> keyword allows association configuration even when no suitable network interface is found at configuration time. The dynamic interface update mechanism may complete the configuration when new interfaces appear (e.g. WLAN/PPP interfaces) at a later time and thus render the association operable.
<dt><tt>addserver <i>peer_address</i> [
<i>keyid</i> ] [ <i>version</i> ] [
<tt>minpoll# | prefer | iburst | burst | minpoll
<dt><tt>addserver <i>peer_address</i> [
<tt>prefer | iburst | burst | minpoll
<i>N</i> | <tt>maxpoll</tt> <i>N</i> | <tt>keyid</tt>
- <i>N</i> | <tt>version</tt> <i>N</i> [...] [ <i>dynamic</i> ] ]</tt>
+ <i>N</i> | <tt>version</tt> <i>N</i> [...] ]</tt>
<dd>Identical to the addpeer command, except that the operating mode is client.
<dt><tt>broadcast <i>peer_address</i> [
<i>keyid</i> ] [ <i>version</i> ] [ <i>prefer</i> ]</tt>
#define FLAG_FIXPOLL 0x1000 /* stick at minpoll */
#define FLAG_TRUE 0x2000 /* select truechimer */
#define FLAG_PREEMPT 0x4000 /* preemptable association */
-#define FLAG_DYNAMIC 0x8000 /* dynamic addresses - allow configuration even if no interface is found */
/*
* Definitions for the clear() routine. We use memset() to clear
#define CONF_FLAG_IBURST 0x08
#define CONF_FLAG_NOSELECT 0x10
#define CONF_FLAG_SKEY 0x20
-#define CONF_FLAG_DYNAMIC 0x40
/*
* Structure for passing peer deletion information. Currently
peerflags |= FLAG_IBURST;
break;
- case CONF_MOD_DYNAMIC:
- peerflags |= FLAG_DYNAMIC;
+ case CONF_MOD_DYNAMIC:
+ msyslog(LOG_WARNING,
+ "Warning: the \"dynamic\" keyword has been obsoleted"
+ " and will be removed in the next release\n");
break;
#ifdef OPENSSL
}
if ((intval[TOK_FLAGS] & ~(FLAG_AUTHENABLE | FLAG_PREFER |
- FLAG_NOSELECT | FLAG_BURST | FLAG_IBURST | FLAG_SKEY | FLAG_DYNAMIC))
+ FLAG_NOSELECT | FLAG_BURST | FLAG_IBURST | FLAG_SKEY))
!= 0) {
msyslog(LOG_ERR, "invalid flags (%ld) in file %s",
intval[TOK_FLAGS], name);
flags |= CONF_FLAG_IBURST;
if (intval[TOK_FLAGS] & FLAG_SKEY)
flags |= CONF_FLAG_SKEY;
- if (intval[TOK_FLAGS] & FLAG_DYNAMIC)
- flags |= CONF_FLAG_DYNAMIC;
/*
* This is as good as we can check it. Add it in.
cast_flags, stoa(srcadr)));
ISC_LINK_INIT(peer, ilink); /* set up interface link chain */
-
- dstadr = select_peerinterface(peer, srcadr, dstadr, cast_flags);
-
- /*
- * If we can't find an interface to use we return a NULL
- * unless the DYNAMIC flag is set - then we expect the dynamic
- * interface detection code to bind us some day to an interface
- */
- if (dstadr == NULL && !(flags & FLAG_DYNAMIC))
- {
- msyslog(LOG_ERR, "Cannot find existing interface for address %s", stoa(srcadr));
-
- peer->next = peer_free;
- peer_free = peer;
- peer_associations--;
- peer_free_count++;
-
- return (NULL);
- }
-
peer->srcadr = *srcadr;
+ set_peerdstadr(peer, select_peerinterface(peer, srcadr, dstadr,
+ cast_flags));
peer->hmode = (u_char)hmode;
peer->version = (u_char)version;
peer->minpoll = (u_char)max(NTP_MINPOLL, minpoll);
peer->maxpoll = (u_char)min(NTP_MAXPOLL, maxpoll);
peer->flags = flags;
-
- set_peerdstadr(peer, dstadr);
-
#ifdef DEBUG
if (debug > 2) {
if (peer->dstadr)
printf("newpeer: using fd %d and our addr %s\n",
- peer->dstadr->fd, stoa(&peer->dstadr->sin));
+ peer->dstadr->fd,
+ stoa(&peer->dstadr->sin));
else
printf("newpeer: local interface currently not bound\n");
}
#endif
-
+
/*
* Broadcast needs the socket enabled for broadcast
*/
&& temp_cp.hmode != MODE_BROADCAST)
fl = 1;
if (temp_cp.flags & ~(CONF_FLAG_AUTHENABLE | CONF_FLAG_PREFER
- | CONF_FLAG_BURST | CONF_FLAG_IBURST | CONF_FLAG_SKEY | CONF_FLAG_DYNAMIC))
+ | CONF_FLAG_BURST | CONF_FLAG_IBURST | CONF_FLAG_SKEY))
fl = 1;
cp = (struct conf_peer *)
((char *)cp + INFO_ITEMSIZE(inpkt->mbz_itemsize));
fl |= FLAG_IBURST;
if (temp_cp.flags & CONF_FLAG_SKEY)
fl |= FLAG_SKEY;
- if (temp_cp.flags & CONF_FLAG_DYNAMIC)
- fl |= FLAG_DYNAMIC;
if (client_v6_capable && temp_cp.v6_flag != 0) {
peeraddr.ss_family = AF_INET6;
{ "", "", "", "" },
"display event timer subsystem statistics" },
{ "addpeer", addpeer, { NTP_ADD, OPT|NTP_STR, OPT|NTP_STR, OPT|NTP_STR },
- { "addr", "keyid", "version", "minpoll#|prefer|burst|iburst|dynamic|'minpoll N'|'maxpoll N'|'keyid N'|'version N' ..." },
+ { "addr", "keyid", "version", "minpoll#|prefer|burst|iburst|'minpoll N'|'maxpoll N'|'keyid N'|'version N' ..." },
"configure a new peer association" },
{ "addserver", addserver, { NTP_ADD, OPT|NTP_STR, OPT|NTP_STR, OPT|NTP_STR },
- { "addr", "keyid", "version", "minpoll#|prefer|burst|iburst|dynamic|'minpoll N'|'maxpoll N'|'keyid N'|'version N' ..." },
+ { "addr", "keyid", "version", "minpoll#|prefer|burst|iburst|'minpoll N'|'maxpoll N'|'keyid N'|'version N' ..." },
"configure a new server" },
{ "addrefclock",addrefclock, { NTP_ADD, OPT|NTP_UINT, OPT|NTP_STR, OPT|NTP_STR },
{ "addr", "mode", "minpoll|prefer", "minpoll|prefer" },
else if (STREQ(pcmd->argval[items].string, "burst"))
flags |= CONF_FLAG_BURST;
else if (STREQ(pcmd->argval[items].string, "dynamic"))
- flags |= CONF_FLAG_DYNAMIC;
+ (void) fprintf(fp, "Warning: the \"dynamic\" keyword has been obsoleted and will be removed in the next release\n");
else if (STREQ(pcmd->argval[items].string, "iburst"))
flags |= CONF_FLAG_IBURST;
else if (!refc && STREQ(pcmd->argval[items].string, "keyid"))