]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
privsep: Set a zero length receive buffer for write only sockets
authorRoy Marples <roy@marples.name>
Sun, 16 Aug 2020 17:52:17 +0000 (18:52 +0100)
committerRoy Marples <roy@marples.name>
Sun, 16 Aug 2020 17:52:17 +0000 (18:52 +0100)
commite5679c5f411e561c31a30fb9cf730ff54b9242ac
tree376202e6df9933671ca5f2e84b0879d1cb422be2
parentcef90b983f28cbe01b9df2e3ba920dcdbd85b60f
privsep: Set a zero length receive buffer for write only sockets

We cannot use shutdown(2) because they are not connected.
Constantly draining would be a waste of CPU time, so just let
the buffer overflow. To ease the kernel as much as we can, set
a zero length buffer.

The kernel may still allocate a small buffer, but this is kernel
dependant and we're just trying to be helpful.
src/privsep-root.c