Skip to content

syslog-ng: bind localhost source with ip-freebind#30045

Open
graysky2 wants to merge 1 commit into
openwrt:masterfrom
graysky2:syslog-ng-fix
Open

syslog-ng: bind localhost source with ip-freebind#30045
graysky2 wants to merge 1 commit into
openwrt:masterfrom
graysky2:syslog-ng-fix

Conversation

@graysky2

Copy link
Copy Markdown
Contributor

📦 Package Details

Maintainer: @BKPepe
(You can find this by checking the history of the package Makefile.)

Description:

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.


🧪 Run Testing Details

  • OpenWrt Version: SNAPSHOT
  • OpenWrt Target/Subtarget: x86/64-glibc
  • OpenWrt Device: N150

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/<your-package>/refresh V=s
  • It is structured in a way that it is potentially upstreamable
    (e.g., subject line, commit description, etc.)
    We must try to upstream patches to reduce maintenance burden.

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 <therealgraysky@proton.me>

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit; no new issues found.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants