On Fri, Feb 01, 2019 at 08:16:41AM -0800, Richard Cochran wrote:
> On Fri, Feb 01, 2019 at 10:16:53AM +0000, Vincent Li X wrote:
> >
> > Hi Richard,
> > I mean the change of that two lines to like:
> > if (cnt < m->header.messageLength || m->header.messageLength <
> > pdulen) {
> > pr_debug("wrong length, cnt: %d messageLength: %hu pdulen
>
> The rule in communication is to be strict when sending, but generous
> when receiving. This code generously allows incorrect messageLength.
By "this" I mean the current linuxptp code, not the your example!
> That field is redundant, because all of the transports already provide
> the packet length. Thus there is no need to check it.
>
> If we were using a stream transport like TCP, then checking
> messageLength would of course be essential.
>
> Thanks,
> Richard
>
>
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel