On Tue, Mar 19, 2019 at 01:42:48PM +1100, David Mirabito via Linuxptp-devel 
wrote:
> The manpage for recvmsg says -1 will be returned on error, Zero indicates an
> "orderly shutdown", presumably only in case of stream sockets.
> Further, UNIX Network Programming, Vol 1 says ".. a return value of 0 from
> recvfrom is acceptable for a datagram protocol"
> 
> Such packets have been observed in the wild, aimed at PTP's multicast
> address and port, possibly related to malformed management queries.
> 
> Patch to properly check return from recvmesg and not trigger the fault
> codepath. Instead, such packets are treated as "Bad Message" the same as
> non-zero but still too-short UDP payloads.
> 
> Signed-off-by: David Mirabito <[email protected]>
> ---
>  port.c | 2 +-
>  sk.c   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied.

Thanks,
Richard


_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to