On Tue, 17 Nov 2020 00:59:54 +0000 Vadim Fedorenko wrote:
> >>> Sorry I wasn't clear enough, should this be:
> >>>
> >>>   if (ctx->control != control)
> >>>
> >>> ? Otherwise if we get a control record first and then data record
> >>> the code will collapse them, which isn't correct, right?
> >>>     
> >>>>                                  goto recv_end;
> >>>>                  } else {
> >>>>                          break;  
> >> I think you mean when ctx->control is control record and control is
> >> data record.  
> > Yup.
> >  
> >> In this case control message will be decrypted without
> >> zero copy and will be stored in skb for the next recvmsg, but will
> >> not be returned together with data message.  
> > Could you point me to a line which breaks the loop in that case?
> >  
> Sure!
> 
>               if (!control)
>                       control = tlm->control;
>               else if (control != tlm->control)
>                       goto recv_end;
> 
> 
> In that case control != tlm->control
> Variable control is set only once and never changes again.

You're right! Applied, thanks!

Reply via email to