summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorAnders Bergh <anders1@gmail.com>2014-06-18 14:07:46 +0200
committerSébastien Helleu <flashcode@flashtux.org>2014-09-28 14:45:57 +0200
commit85339f60837413919bfe6e9566aa748124911a76 (patch)
tree39c064ae29dbff0536f51928b5595ec8f5c88314 /src/plugins
parent9aee60bd89e600b24fa42a8a1765fe6bfc95634d (diff)
downloadweechat-85339f60837413919bfe6e9566aa748124911a76.zip
relay: don't print ::ffff: in v4-mapped addresses.
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/relay/relay-server.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/relay/relay-server.c b/src/plugins/relay/relay-server.c
index 900ecf9c1..6c6c07cf7 100644
--- a/src/plugins/relay/relay-server.c
+++ b/src/plugins/relay/relay-server.c
@@ -269,6 +269,12 @@ relay_server_sock_cb (void *data, int fd)
INET6_ADDRSTRLEN))
{
ptr_ip_address = ipv6_address;
+
+ if (strncmp (ptr_ip_address, "::ffff:", 7) == 0)
+ {
+ /* actually an IPv4-mapped IPv6 address, so skip ::ffff: */
+ ptr_ip_address += 7;
+ }
}
}
else