Commit fe538cc4 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Set enable-timestamps by default is max-rtt-penalty is positive.

parent 227e55ec
......@@ -333,7 +333,12 @@ packet loss is expected. The default is four times the hello interval.
.BR enable\-timestamps " {" true | false }
Enable sending timestamps with each Hello and IHU message in order to
compute RTT values. The default is
.BR false .
.B true
if
.B max\-rtt\-penalty
is non-zero (see below), and
.B false
otherwise.
.TP
.BI rtt\-exponential\-decay " decay"
This specifies the decay factor for the exponential moving average of
......
......@@ -293,9 +293,6 @@ interface_up(struct interface *ifp, int up)
if(IF_CONF(ifp, faraway) == CONFIG_YES)
ifp->flags |= IF_FARAWAY;
if(IF_CONF(ifp, enable_timestamps) == CONFIG_YES)
ifp->flags |= IF_TIMESTAMPS;
if(IF_CONF(ifp, hello_interval) > 0)
ifp->hello_interval = IF_CONF(ifp, hello_interval);
else if((ifp->flags & IF_WIRED))
......@@ -327,6 +324,11 @@ interface_up(struct interface *ifp, int up)
}
ifp->max_rtt_penalty = IF_CONF(ifp, max_rtt_penalty);
if(IF_CONF(ifp, enable_timestamps) == CONFIG_YES ||
(IF_CONF(ifp, enable_timestamps) == CONFIG_DEFAULT &&
ifp->max_rtt_penalty > 0))
ifp->flags |= IF_TIMESTAMPS;
if(ifp->ll)
free(ifp->ll);
ifp->numll = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment