Re: [Linuxptp-devel] Forwarding management messages to UDS port
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
|
From: Miroslav L. <mli...@re...> - 2017-12-07 09:12:33
|
On Wed, Dec 06, 2017 at 08:02:56AM -0800, Richard Cochran wrote: > On Wed, Dec 06, 2017 at 02:44:23PM +0100, Miroslav Lichvar wrote: > > A better option might be to forward only responses to the UDS port. We > > don't expect a PTP clock to be listening there, right? > > Right, but we should also forward the ACKNOWLEDGE messages. Ok. > Yes, but the check should be made in this function > > static int forwarding(struct clock *c, struct port *p) > > by passing in the 'msg' as well. The trouble is that forwarding() is called twice from clock_forward_mgmt_msg(), once with the source port and then with the destination port. So, if it returned 0 for p == uds->port and action == REQUEST, requests from pmc would not be forwarded. Should it pass NULL as a msg in the first call to avoid the action check? -- Miroslav Lichvar |