Commit e425da2f inadvertently enabled the announce timer on the UDS port,
causing it to continually reopen the socket when in slave mode. This patch
fixes the issue by passing zero in the 'span' field of the new function,
set_tmo_random, which disables the timer again.

Signed-off-by: Richard Cochran <[email protected]>
Reported-by: Rohrer Hansjoerg <[email protected]>
---
 ds.h    |    1 +
 port.c  |    3 ++-
 ptp4l.c |    1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/ds.h b/ds.h
index 0cc94b5..2ecda8d 100644
--- a/ds.h
+++ b/ds.h
@@ -130,6 +130,7 @@ struct port_defaults {
        UInteger8 announceReceiptTimeout;
        UInteger8 syncReceiptTimeout;
        UInteger8 transportSpecific;
+       int announce_span;
        int path_trace_enabled;
        int follow_up_info;
        int freq_est_interval; /*log seconds*/
diff --git a/port.c b/port.c
index b382194..7229429 100644
--- a/port.c
+++ b/port.c
@@ -843,7 +843,8 @@ static void port_nrate_initialize(struct port *p)
 static int port_set_announce_tmo(struct port *p)
 {
        return set_tmo_random(p->fda.fd[FD_ANNOUNCE_TIMER],
-                      p->announceReceiptTimeout, 1, p->logAnnounceInterval);
+                             p->announceReceiptTimeout,
+                             p->pod.announce_span, p->logAnnounceInterval);
 }
 
 static int port_set_delay_tmo(struct port *p)
diff --git a/ptp4l.c b/ptp4l.c
index d5482ce..d5a3aab 100644
--- a/ptp4l.c
+++ b/ptp4l.c
@@ -84,6 +84,7 @@ static struct config cfg_settings = {
                .announceReceiptTimeout = 3,
                .syncReceiptTimeout = 0,
                .transportSpecific = 0,
+               .announce_span = 1,
                .path_trace_enabled = 0,
                .follow_up_info = 0,
                .freq_est_interval = 1,
-- 
1.7.10.4


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to