Branch: refs/heads/no-root
Home:
https://github.com/kronosnet/kronosnet
Commit: 3629f34f6ad1d56c641566d00a6cfcc96c853bf7
https://github.com/kronosnet/kronosnet/commit/3629f34f6ad1d56c641566d00a6cf…
Author: Ferenc Wágner <wferi(a)debian.org>
Date: 2017-11-25 (Sat, 25 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.