Subject: RE: IPv4-mapped IPv6 IP bind()ing problems...
To: None <tech-net@netbsd.org>
From: icmps <icmp@icmps.org>
List: tech-net
Date: 03/07/2003 07:51:02
Heh... I thought so too, but:

$ sysctl net.inet6.ip6.v6only
net.inet6.ip6.v6only = 0

$ ./test
test:  yes
test: bind=-1: Can't assign requested address
test: connect=-1: Connection refused

the yes just says the IN6_IS_ADDR_V4MAPPED(&var.sin6_addr) was true...

also, the port I htons() is just for testing purposes... the connect()
should return ECONNREFUSED :/ but as you can see, the bind returns
EADDRNOTAVAIL w/ the v6only sysctl as 0. heh

my uname:
NetBSD gateway.icmps.org 1.6_STABLE NetBSD 1.6_STABLE (GATEWAY) #1: Wed
Jan 22 15:28:11 EST 2003
root@gateway.icmps.org:/usr/src/sys/arch/i386/compile/GATEWAY i386

And I have INET6 in my kernel + use gif tunneling for ipv6 connectivity
(works great other than this little issue lol)

-----Original Message-----
From: Ignatios Souvatzis [mailto:ignatios@theory.cs.uni-bonn.de] 
Sent: Friday, March 07, 2003 4:03 AM
To: Martin Husemann
Cc: icmps; tech-net@netbsd.org
Subject: Re: IPv4-mapped IPv6 IP bind()ing problems...

On Thu, Mar 06, 2003 at 10:54:04PM +0100, Martin Husemann wrote:
 
> There is a sysctl which you can use to get the old behaviour back
(sorry,
> can't remember the name)

sysctl -w net.inet6.ip6.v6only = 0

	-is