summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-07 22:51:16 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-07 22:51:16 +0000
commitbbcf97fad6408739a945b1452f9bcb05b2d08755 (patch)
tree3f70ce06011d6bca874f04e7d3414fa765b78474 /ext/socket
parent42642407591bd76d2f68eed559e42deef9adc157 (diff)
* ext/socket/socket.c (socket_s_ip_address_list): fix wrongly filled
sin6_scope_id on KAME introduced by r40593 for OpenIndiana. KAME uses fe80:<scope_id>::<interface id> for link-local address internally. Setting sin6_scope_id causes it leaked. see also comments of sockaddr_obj(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 43bff85..8172ae4 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1658,7 +1658,7 @@ socket_s_ip_address_list(VALUE self)
for (p = ifp; p; p = p->ifa_next) {
if (p->ifa_addr != NULL && IS_IP_FAMILY(p->ifa_addr->sa_family)) {
struct sockaddr *addr = p->ifa_addr;
-#if defined(AF_INET6)
+#if defined(AF_INET6) && defined(__sun)
/*
* OpenIndiana SunOS 5.11 getifaddrs() returns IPv6 link local
* address with sin6_scope_id == 0.