1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:47:35 +00:00

Kernel: Properly support the SO_BROADCAST socket option

POSIX requires that broadcast sends will only be allowed if the
SO_BROADCAST socket option was set on the socket.
Also, broadcast sends to protocols that do not support broadcast (like
TCP), should always fail.
This commit is contained in:
Idan Horowitz 2023-12-24 19:01:09 +02:00 committed by Andreas Kling
parent 8b2beb2ebe
commit 545f4b6cc1
7 changed files with 36 additions and 6 deletions

View file

@ -156,6 +156,7 @@ protected:
ucred m_origin { 0, 0, 0 };
ucred m_acceptor { 0, 0, 0 };
bool m_routing_disabled { false };
bool m_broadcast_allowed { false };
private:
virtual bool is_socket() const final { return true; }