syslogd: If system has SO_REUSEPORT, use it

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-11-12 13:25:21 +01:00
parent 095aa56996
commit 2f72a17b8e

View File

@ -128,6 +128,11 @@ skip: switch (family) {
ERR("setsockopt(REUSEADDR), suspending inet");
return -1;
}
#ifdef SO_REUSEPORT
if (setsockopt(sd, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on)) < 0) {
ERR("setsockopt(REUSEPORT), suspending inet");
}
#endif
break;
}