1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

Support SO_REUSEPORT_LB.

This has been accepted by syslog-ng upstream and committed. It will
be supported in the next release of syslog-ng.

PR:		syslog-ng329/Makefile
Submitted by:	Boris Korzun <drtr0jan@yandex.ru>
Reviewed by:	Peter Czanik (syslog-ng upstream)
This commit is contained in:
Cy Schubert 2020-09-29 17:05:35 +00:00
parent b5a6964b23
commit b7231cf725
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=550537
2 changed files with 21 additions and 1 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= syslog-ng
DISTVERSION= 3.29.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= https://github.com/balabit/syslog-ng/releases/download/syslog-ng-${DISTVERSION}/
.if !defined(MASTERDIR)

View File

@ -0,0 +1,20 @@
--- modules/afsocket/socket-options.c.orig 2020-08-10 18:04:39 UTC
+++ modules/afsocket/socket-options.c
@@ -86,7 +86,16 @@ _setup_keepalive(gint fd)
static gboolean
_setup_reuseport(gint fd)
{
-#ifdef SO_REUSEPORT
+#if defined(SO_REUSEPORT_LB)
+ gint on = 1;
+ if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT_LB, &on, sizeof(on)) < 0)
+ {
+ msg_error("The kernel refused our SO_REUSEPORT_LB setting",
+ evt_tag_error("error"));
+ return FALSE;
+ }
+ return TRUE;
+#elif defined(SO_REUSEPORT)
gint on = 1;
if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on)) < 0)
{