From 851d43b3ea6cacaad06a0396075d958108c57cc7 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sun, 19 Jul 2026 08:34:48 -0400 Subject: [PATCH] syslog-ng: bind localhost source with ip-freebind The network_localhost source binds ::1 or 127.0.0.1 on port 514... but this bind fails with EADDRNOTAVAIL when syslog-ng starts early in boot before netifd has brought lo up and assigned its addresses. This results in the entire syslog-ng instance exiting out with code 2 so no logging. Add ip-freebind(yes) so the socket can bind before the loopback address exists and starts receiving once it appears. This change only affects the early-boot race, once lo is up, the behavior is unchanged. Signed-off-by: John Audia --- admin/syslog-ng/Makefile | 2 +- admin/syslog-ng/files/scl/network_localhost/detect.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/syslog-ng/Makefile b/admin/syslog-ng/Makefile index 1d2dc8510970f..8c4eba618cfc0 100644 --- a/admin/syslog-ng/Makefile +++ b/admin/syslog-ng/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=syslog-ng PKG_VERSION:=4.11.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Josef Schlehofer PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later diff --git a/admin/syslog-ng/files/scl/network_localhost/detect.sh b/admin/syslog-ng/files/scl/network_localhost/detect.sh index acfb40704a976..12c93e51f7bc6 100755 --- a/admin/syslog-ng/files/scl/network_localhost/detect.sh +++ b/admin/syslog-ng/files/scl/network_localhost/detect.sh @@ -1,6 +1,6 @@ #!/bin/sh if [ "$(sysctl -n net.ipv6.conf.lo.disable_ipv6)" = "0" ]; then - echo 'network(ip("::1") port(514) transport(udp) ip-protocol(6) )' + echo 'network(ip("::1") port(514) transport(udp) ip-protocol(6) ip-freebind(yes) )' else - echo 'network(ip("127.0.0.1") port(514) transport(udp) ip-protocol(4) )' + echo 'network(ip("127.0.0.1") port(514) transport(udp) ip-protocol(4) ip-freebind(yes) )' fi