Enhance error log for Network is unreachable due to prefer-ipv6
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
[...]
I would go stronger here, LOG_MISC instead of debug, verify that the address family was AF_INET6
now its even better. ty for the push.