net/ProtocolUtilities: Return EOPNOTSUPP when unhandled flags are specified.

Same as has already been done for UNIX domain sockets and TCP
(this is used in the implementation of UDP.)
This commit is contained in:
Augustin Cavalier
2023-11-22 11:40:02 -05:00
parent 42e4cb759a
commit 73eb03214e
+3
View File
@@ -213,6 +213,9 @@ DECL_DATAGRAM_SOCKET(inline status_t)::EnqueueClone(net_buffer* _buffer)
DECL_DATAGRAM_SOCKET(inline status_t)::Dequeue(uint32 flags,
net_buffer** _buffer)
{
if ((flags & ~(MSG_DONTWAIT | MSG_PEEK)) != 0)
return EOPNOTSUPP;
return BlockingDequeue((flags & MSG_PEEK) != 0, _SocketTimeout(flags),
_buffer);
}