Buffering Unix-domain socket
-
Hello fellow Netgate open-source Community members can you please help?
Does changing this setting in SystemAdvancedSystem Tunables cause any issues? Are there any problems with doing this from a cybersecurity perspective?net.local.dgram.recvspace: 262144 net.local.dgram.maxdgram: 16384
As quited on Freebsd's website
"The Unix-domain sockets of type SOCK_DGRAM are unreliable and always
non-blocking for write operations. The default receive buffer can be
configured with net.local.dgram.recvspace. The maximum allowed data-
gram size is limited by net.local.dgram.maxdgram. A SOCK_DGRAM socket
that has been bound with bind(2) can have multiple peers connected at
the same time. The modern FreeBSD implementation will allocate
net.local.dgram.recvspace sized private buffers in the receive buffer
of the bound socket for every connected socket, preventing a situation
when a single writer can exhaust all of buffer space. Messages coming
from unconnected sends using sendto(2) land on the shared buffer of the
receiving socket, which has the same size limit. A side effect of the
implementation is that it doesn't guarantee that writes from different
senders will arrive at the receiver in the same chronological order
they were sent. The order is preserved for writes coming through a
particular connection."Ref:
https://man.freebsd.org/cgi/man.cgi?query=unix&sektion=4