On Mon, May 02, 2022 at 11:05:57AM +0200, Arkadiusz Kubalewski wrote: > Add interface for sending and receiving ESMC frames. > Ethernet Synchronization Messaging Channel (ESMC) requires > to operate on multicast raw L2 socket. This patch adds features > to open socket, send and receive ESMC frames.
> +++ b/esmc_socket.c > @@ -0,0 +1,111 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ linuxptp is GPLv2+, so I think the new code should be submitted under the same or at least compatible license to not build binaries with different licenses. > +int recv_raw_esmc_frame(int socket, void *buff) > +{ > + return recv(socket, buff, ETH_DATA_LEN, 0); > +} This looks dangerous to me. I'd suggest to add the length of the buffer as an argument, or maybe pass it as esmc_data and sizeof the data field. -- Miroslav Lichvar _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel