bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/4] lwip: Fix bug: Remove unsupported flags when calling sen


From: Samuel Thibault
Subject: Re: [PATCH 1/4] lwip: Fix bug: Remove unsupported flags when calling send().
Date: Thu, 2 May 2019 23:54:58 +0200
User-agent: NeoMutt/20170113 (1.7.2)

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

[Prev in Thread] Current Thread [Next in Thread]