NetBSD (unlike Linux) has the V6ONLY socket option turned on by
default.  So to work in the rump kernel environment when tested with
IPv4 we need to adjust this setting.

Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
---
 rump-test-net.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/rump-test-net.c b/rump-test-net.c
index 96dbb1c..486a261 100644
--- a/rump-test-net.c
+++ b/rump-test-net.c
@@ -21,6 +21,10 @@ int main(int argc, const char *const *argv) {
     master = socket(AF_INET6,SOCK_STREAM,0);
     if (master<0) { perror("socket"); exit(-1); }
 
+    int no = 0;
+    r = setsockopt(master, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&no, sizeof(no));
+    if (r<0) { perror("IPV6_V6ONLY"); exit(-1); }
+
     int port = atoi(argv[1]);
 
     memset(&sin6,0,sizeof(sin6));
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to