Skip to content

fix: use correct Socket::INADDR_ANY for unix socket client auth#27

Draft
toddr-bot wants to merge 1 commit intomainfrom
koan.toddr.bot/fix-issue-1
Draft

fix: use correct Socket::INADDR_ANY for unix socket client auth#27
toddr-bot wants to merge 1 commit intomainfrom
koan.toddr.bot/fix-issue-1

Conversation

@toddr-bot
Copy link

@toddr-bot toddr-bot commented Mar 21, 2026

Summary

Fix IN_ADDR_ANY is not a valid Socket macro error when using proto => 'unix' with clients defined. The constant Socket::IN_ADDR_ANY() does not exist — the correct name is Socket::INADDR_ANY (no underscore between IN and ADDR).

Fixes #1

Changes

  • Fix Socket::IN_ADDR_ANY()Socket::INADDR_ANY in the Accept method's unix socket branch
  • Add t/unix_clients.t test covering unix sockets with clients access control

Test plan

  • New test t/unix_clients.t spawns a server with --localpath and a config file defining clients, then verifies connection and data exchange succeed
  • Full test suite passes (48 tests across 11 files)

Generated by Kōan /fix


Quality Report

Changes: 3 files changed, 71 insertions(+), 1 deletion(-)

Code scan: 1 issue(s) found

  • t/unix_clients.t:53 — debug print statement

Tests: passed (OK)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

Socket::IN_ADDR_ANY() is not a valid Socket macro. The correct constant
is Socket::INADDR_ANY (no underscore between IN and ADDR). This caused
"Child died: IN_ADDR_ANY is not a valid Socket macro" when using
proto => 'unix' with clients defined, because the Accept method calls
this constant to build a fake localhost address tuple for host-based
authorization on unix socket connections.

Fixes #1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Cannot use proto => 'unix' and clients => {...} [rt.cpan.org #30379]

1 participant