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:
parent
b5a6964b23
commit
b7231cf725
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=550537
@ -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)
|
||||
|
@ -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)
|
||||
{
|
Loading…
Reference in New Issue
Block a user