On Tue, 3 May 2022 at 11:25, Miroslav Lichvar <mlich...@redhat.com> wrote:

> 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.
>

I agree, new code should use the same license: "GPL-2.0+"

We could also add the "SPDX-FileCopyrightText:" tag.
It helps finding the copyright with the license per file :-)

Maybe it is time to update all the source headers to a format like:
/**
 * @file XXX.c
 * @brief XXXXX
 * @note SPDX-FileCopyrightText: (C) 20XX NN FF <use@mailserver>
 * @note SPDX-License-Identifier: GPL-2.0+
 */

Seems we are not uniform on that.
I think each copyright holder should update its own sources.

Erez


>
> > +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
>
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to