plan9 picked an ipv4 local address for outgoing ipv6 connection. machine picked local=::ffff:10.192.254.99 for remote=2001:db8::1. incoming connections from that machine worked fine. term% cat /net/iproute 0.0.0.0 /96 10.192.254.33 4 none - 10.0.0.0 /128 10.0.0.0 4b ifc - 10.192.254.0 /120 10.192.254.0 4i ifc 0 10.192.254.0 /128 10.192.254.0 4b ifc - 10.192.254.99 /128 10.192.254.99 4u ifc 0 10.192.254.255 /128 10.192.254.255 4b ifc - 10.255.255.255 /128 10.255.255.255 4b ifc - 255.255.255.255 /128 255.255.255.255 4b ifc - 2001:db8:: /64 2001:db8:: 6i ifc 0 fe80:: /64 fe80:: 6i ifc - ff02:: /16 ff02::1 6m ifc 0 ff02::1 /128 ff02::1 6m ifc 0 2001:db8::2d0:59ff:fecf:73a5 /128 2001:db8::2d0:59ff:fecf:73a5 6u ifc 0 fe80::2d0:59ff:fecf:73a5 /128 fe80::2d0:59ff:fecf:73a5 6u ifc 0 ff02::1:ffcf:73a5 /128 ff02::1:ffcf:73a5 6m ifc 0 this patch threats ipv4 addresses as unknown so they dont get used. not sure if this function is the right place todo it or if we should test the ifc flags for v4 instead. probably not the right place to fix it? Notes: Mon May 24 15:29:47 EDT 2010 geoff it's worth a try. i'll try it here for a bit. did it fix your immediate problem? Reference: /n/sources/patch/maybe/ipv6-wrong-laddr Date: Fri May 21 15:36:21 CES 2010 Signed-off-by: cinap_lenrek@gmx.de Reviewed-by: geoff --- /sys/src/9/ip/ipifc.c Fri May 21 15:22:43 2010 +++ /sys/src/9/ip/ipifc.c Fri May 21 15:22:38 2010 @@ -1150,6 +1150,8 @@ int v6addrtype(uchar *addr) { + if(isv4(addr) || ipcmp(addr, IPnoaddr) == 0) + return unknownv6; if(islinklocal(addr) || isv6mcast(addr) && (addr[1] & 0xF) <= Link_local_scop) return linklocalv6;