Skip to content

Conversation

@michaelortmann
Copy link
Member

@michaelortmann michaelortmann commented Jan 31, 2025

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
Copy link
Member

thommey commented Nov 30, 2025

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

@michaelortmann
Copy link
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
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