Samuel Thibault, le jeu. 02 mai 2019 23:53:41 +0200, a ecrit:
> Joan Lledó, le jeu. 02 mai 2019 11:54:59 +0200, a ecrit:
> >     Lwip 2.1.2 added a new assertion to ensure that no unsupported flags
> >     are being sent to lwip_sendmsg(). The send operation must be updated to
> >     remove this unsupported flags.
> 
> > @@ -361,8 +361,11 @@ struct msghdr m = { msg_name:addr ? &addr->address : 0,
> >      return EINVAL;
> >  
> >    sockflags = lwip_fcntl (user->sock->sockno, F_GETFL, 0);
> > +  /* Remove unsupported flags */
> > +  flags &= MSG_DONTWAIT | MSG_MORE;
> >    if (sockflags & O_NONBLOCK)
> >      flags |= MSG_DONTWAIT;
> 
> I don't think we want to blindly drop unsupported flags. The application
> requested some behavior, if we do not implemente it we shall return
> EINVAL.

Put another way: instead, we have to go through flags which we see
happen in the wild, and take appropriate measures (which may really be
to just let lwip_sendmsg return EINVAL, or do the check ourselves if
lwip_sendmsg does assertions instead of returning EINVAL).

Samuel

Reply via email to