summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-03-04 03:05:16 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-03-04 03:05:16 +0000
commit0be624272c2d57e027be919428b99b2ffe15827b (patch)
tree09adaecb4fe41e3a6862b9d2843c3e367c71af80 /src/core
parent62bd2045bbb9b45730e0397baf19476cc56f2bed (diff)
downloadirssi-0be624272c2d57e027be919428b99b2ffe15827b.zip
Forced IPv4 connection to host with only IPv6 address should use the
IPv6 address.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1340 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core')
-rw-r--r--src/core/servers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/servers.c b/src/core/servers.c
index ae998800..6ad9b711 100644
--- a/src/core/servers.c
+++ b/src/core/servers.c
@@ -177,7 +177,7 @@ static void server_connect_callback_readpipe(SERVER_REC *server)
/* figure out if we should use IPv4 or v6 address */
ip = iprec.error != 0 ? NULL : iprec.ip6.family == 0 ||
- server->connrec->family == AF_INET ?
+ (server->connrec->family == AF_INET && iprec.ip4.family != 0) ?
&iprec.ip4 : &iprec.ip6;
if (iprec.ip4.family != 0 && server->connrec->family == 0 &&
!settings_get_bool("resolve_prefer_ipv6"))