Menu

Code Commit Log


Commit Date  
[766efe] (v1.7.1v1.7.x) by Richard Cochran Richard Cochran

Version 1.7.1

Signed-off-by: Richard Cochran <richardcochran@...>

2021-07-03 13:47:42 Tree
[4a9eef] by Richard Cochran Richard Cochran

Validate the messageLength field of incoming messages.

The PTP messageLength field is redundant because the length of a PTP
message is precisely determined by the message type and the appended
TLVs. The current implementation validates the sizes of both the main
message (according to the fixed header length and fixed length by
type) and the TLVs (by using the 'L' of the TLV).

However, when forwarding a message, the messageLength field is used.
If a message arrives with a messageLength field larger than the actual
message size, the code will read and possibly write data beyond the
allocated buffer.

Fix the issue by validating the field on ingress. This prevents
reading and sending data past the message buffer when forwarding a
management message or other messages when operating as a transparent
clock, and it also prevents a memory corruption in msg_post_recv()
after forwarding a management message.

Reported-by: Miroslav Lichvar <mlichvar@...>
Signed-off-by: Richard Cochran <richardcochran@...>

2021-06-22 12:25:44 Tree
[159f4a] (v1.7) by Richard Cochran Richard Cochran

Version 1.7

Signed-off-by: Richard Cochran <richardcochran@...>

2016-07-21 14:49:14 Tree
[914ca8] by Miroslav Lichvar Miroslav Lichvar , pushed by Richard Cochran Richard Cochran

timemaster: ignore failures of non-essential processes.

Assume only the chronyd or ntpd process is essential for synchronization
of the system clock and ignore SIGCHLD from other processes. This should
provide resiliency against possible bugs in ptp4l or phc2sys that can
terminate the processes.

Signed-off-by: Miroslav Lichvar <mlichvar@...>

2016-07-14 11:43:48 Tree
[395544] by Miroslav Lichvar Miroslav Lichvar , pushed by Richard Cochran Richard Cochran

timemaster: add option to specify first SHM segment.

This allows using a sequence of SHM segments that starts with a number
larger than zero, which can be useful to avoid conflicts with time
sources that are not started by timemaster, e.g. gpsd using segments
number 0 and 1.

Signed-off-by: Miroslav Lichvar <mlichvar@...>

2016-07-14 11:43:47 Tree
[ac7709] by Miroslav Lichvar Miroslav Lichvar , pushed by Richard Cochran Richard Cochran

timemaster: allow arbitrary options in server/refclock directives.

Instead of trying to support all options of the server and refclock
directives in both NTP implementations, add an "ntp_options" option
which specifies a string that is added directly to the lines in the
chronyd/ntpd configuration file.

Signed-off-by: Miroslav Lichvar <mlichvar@...>

2016-07-14 11:43:46 Tree
[1e667f] by Jesuiter, Henry (ALC NetworX GmbH) Jesuiter, Henry (ALC NetworX GmbH) , pushed by Richard Cochran Richard Cochran

Introduce options to set DSCP values in PTP messages.

In the last years there are several media streaming standards
evolving that are relying on PTP. These standards make requirements
about the DSCP priority of PTP messages. This patch introduces two
new configuration options 'dscp_event' and 'dscp_general' to address
that issue and to be able to set the DSCP priority separately for
PTP event messages and PTP general messages.

Signed-off-by: Henry Jesuiter <henry.jesuiter@...>
Signed-off-by: Richard Cochran <richardcochran@...>

2016-07-12 11:52:48 Tree
[dc0931] by Jesuiter, Henry (ALC NetworX GmbH) Jesuiter, Henry (ALC NetworX GmbH) , pushed by Richard Cochran Richard Cochran

Fix data type for return value of vasprintf()

Since size_t is an unsigned data type, it won't evaluate correctly on errors
of vasprintf(). This patch makes 'len2' a signed integer, as expected by
vasprintf().

'len2' is of type 'size_t' in util.c:451, but vasprintf in line
457 returns '-1' on error which is checked in line 460. Currently
this check will always fail (regardless of the return value of
vasprintf()), according to its declaration as unsigned int.

[ RC: Added more explanation taken from another list message. ]

Signed-off-by: Henry Jesuiter <henry.jesuiter@...>

2016-07-08 09:41:16 Tree
[3938cb] by Richard Cochran Richard Cochran

uds: Prevent unintentional announce message timeouts.

During the configuration rework, the announce span was wrongly converted
into a hard coded macro. In addition, the announceReceiptTimeout option
inadvertently became non-zero for the UDS port. As a result, the UDS port
sets a useless announce message timer, causing the code to close and reopen
the UDS port every few seconds.

This bug has an interesting history. It was first reported and fixed in
commit f36af8e0 ("uds: disable the accidentally enabled announce timer.").

That very fix was wrongly removed in commit 54f45063 ("port: change
'announce_span' into a macro."). Because of various code changes, this
bad commit cannot be simply reverted now.

This patch re-introduces the 'announce_span' variable and clears both it
and 'announceReceiptTimeout' for the UDS port, effectively disabling the
announce message timer.

Signed-off-by: Richard Cochran <richardcochran@...>

2016-07-05 12:48:59 Tree
[0d6102] by Richard Cochran Richard Cochran

Fix the man page regarding the '-p' option.

The -p option for ptp4l, which specifies the PHC device, was added
before the ethtool get_ts_info ioctl had been invented. Today it does
not "force" the given device as the man page says. Instead this is a
legacy option only useful when running on older kernels.

Signed-off-by: Richard Cochran <richardcochran@...>

2016-07-03 18:45:41 Tree
Older >
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.