Skip to content

Enhance error log for Network is unreachable due to prefer-ipv6 - #1755

Merged
vanosg merged 4 commits into
eggheads:developfrom
michaelortmann:preferipv6
Jan 18, 2026
Merged

vanosg merged 4 commits into
eggheads:developfrom
michaelortmann:preferipv6

Conversation

@michaelortmann

@michaelortmann michaelortmann commented Jan 31, 2025 •

Copy link
Copy Markdown
Member

Found by:
Patch by: michaelortmann
Fixes:

One-line summary:
Enhance error log for Network is unreachable due to prefer-ipv6

Additional description (if needed):
Eggdrop has no automatic fallback regarding prefer-ipv6 nor does it implement https://en.wikipedia.org/wiki/Happy_Eyeballs
Both is not trivial to implement in eggdrop, and discussion in #433 shows its also not trivial to design, so this PR helps out with enhanced logging that is helpful but cheap.

Test cases demonstrating functionality (if applicable):

.console +* 
[...]
.jump
Jumping servers......
[22:32:46] Trying server 127.0.0.1:6668
[22:32:46] net: open_telnet_raw(): idx 4 host 127.0.0.1 ip 127.0.0.1 port 6668 ssl 0
[22:32:46] net: attempted socket connection refused: 127.0.0.1:6668
[22:32:46] Failed connect to 127.0.0.1 (Connection refused ip 127.0.0.1 port 6668 )
.set prefer-ipv6 1
Ok, set.
.jump irc.freenode.net
Jumping servers......
[22:32:58] Trying server irc.freenode.net:6667
[22:32:58] net: open_telnet_raw(): idx 4 host irc.freenode.net ip 2001:19f0:6401:1697:5400:3ff:fe75:91f2 port 6667 ssl 0
[22:32:58] Failed connect to irc.freenode.net (Network is unreachable ip 2001:19f0:6401:1697:5400:3ff:fe75:91f2 port 6667  prefer-ipv6 1)
.set prefer-ipv6 0
Ok, set.
.jump irc.freenode.net
Jumping servers......
[22:33:07] Trying server irc.freenode.net:6667
[22:33:07] net: open_telnet_raw(): idx 4 host irc.freenode.net ip 149.28.246.185 port 6667 ssl 0
[22:33:07] [!m] CAP LS 302
[...]

@vanosg vanosg added this to the v1.10.2 milestone Jun 14, 2025
@thommey

thommey commented Nov 30, 2025

Copy link
Copy Markdown
Member

I would go stronger here, LOG_MISC instead of debug, verify that the address family was AF_INET6

@michaelortmann

Copy link
Copy Markdown
Member Author

now its even better. ty for the push.

@michaelortmann
michaelortmann force-pushed the preferipv6 branch 3 times, most recently from daeb42b to ded71cf Compare November 30, 2025 21:35
@vanosg
vanosg merged commit 2bc6249 into eggheads:develop Jan 18, 2026
26 checks passed
@michaelortmann
michaelortmann deleted the preferipv6 branch January 19, 2026 01:39
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.

3 participants