Branch: refs/heads/no-root
Home:
https://github.com/kronosnet/kronosnet
Commit: c5d47510b71cf4a008952c9d4ca2ae650409512b
https://github.com/kronosnet/kronosnet/commit/c5d47510b71cf4a008952c9d4ca2a…
Author: Ferenc Wágner <wferi(a)debian.org>
Date: 2017-11-24 (Fri, 24 Nov 2017)
Changed paths:
M libknet/tests/test-common.c
M libknet/transport_common.c
Log Message:
-----------
Don't require root privileges unless necessary
On Linux, if /proc/sys/net/core/[rw]mem_max are set to at least
8388608 (KNET_RING_RCVBUFF), setting the socket buffer sizes
doesn't require root privileges.
FreeBSD uses the kern.ipc.maxsockbuf sysctl MIB variable for
capping user buffer requests.
Linux doubles the requested amount for administrative overhead,
but FreeBSD does not, so we can't be too strict when checking
the results.