This will be needed by unicast mode.
Signed-off-by: Richard Cochran <[email protected]>
---
port.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/port.c b/port.c
index 6eeecfa..9ec3253 100644
--- a/port.c
+++ b/port.c
@@ -1315,7 +1315,7 @@ out:
return -1;
}
-static int port_tx_announce(struct port *p)
+static int port_tx_announce(struct port *p, struct address *dst)
{
struct timePropertiesDS *tp = clock_time_properties(p->clock);
struct parent_ds *dad = clock_parent_ds(p->clock);
@@ -1343,6 +1343,10 @@ static int port_tx_announce(struct port *p)
msg->header.flagField[1] = tp->flags;
+ if (dst) {
+ msg->address = *dst;
+ msg->header.flagField[0] |= UNICAST;
+ }
msg->announce.currentUtcOffset = tp->currentUtcOffset;
msg->announce.grandmasterPriority1 = dad->pds.grandmasterPriority1;
msg->announce.grandmasterClockQuality =
dad->pds.grandmasterClockQuality;
@@ -2441,7 +2445,7 @@ static enum fsm_event bc_event(struct port *p, int
fd_index)
case FD_MANNO_TIMER:
pr_debug("port %hu: master tx announce timeout", portnum(p));
port_set_manno_tmo(p);
- return port_tx_announce(p) ? EV_FAULT_DETECTED : EV_NONE;
+ return port_tx_announce(p, NULL) ? EV_FAULT_DETECTED : EV_NONE;
case FD_SYNC_TX_TIMER:
pr_debug("port %hu: master sync timeout", portnum(p));
--
2.11.0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel