summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-11-23 16:33:44 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-11-23 16:33:44 -0800
commitcebe896801452db67165829962ada8db200d5718 (patch)
treec9efa6396e1f15c55dad539409dae400d04e388a
parent820172a7b862b4fa8c87684c7f16b08fbdf523cd (diff)
parentb6317957298897761758aa10b74bf58a853cc307 (diff)
downloadlibcore-cebe896801452db67165829962ada8db200d5718.zip
libcore-cebe896801452db67165829962ada8db200d5718.tar.gz
libcore-cebe896801452db67165829962ada8db200d5718.tar.bz2
Merge change I72b1f303
* changes: Add a comment.
-rw-r--r--luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp b/luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp
index fc98428..ac44c28 100644
--- a/luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp
+++ b/luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp
@@ -358,6 +358,10 @@ static const sockaddr* convertIpv4ToMapped(int fd,
memset(sin6, 0, sizeof(*sin6));
sin6->sin6_family = AF_INET6;
sin6->sin6_port = sin->sin_port;
+ // TODO: mapUnspecified was introduced because kernels < 2.6.31 don't allow
+ // you to bind to ::ffff:0.0.0.0. When we move to something >= 2.6.31, we
+ // should make the code behave as if mapUnspecified were always true, and
+ // remove the parameter.
if (sin->sin_addr.s_addr != 0 || mapUnspecified) {
memset(&(sin6->sin6_addr.s6_addr[10]), 0xff, 2);
}