FreeBSD 5.0 dual-stack server

Jeff W. Boote boote at internet2.edu
Thu Mar 27 15:21:44 PST 2003


Hi,

I have some server code that I've been developing using FreeBSD 4.6 and
4.7. I want this code to run with both IPv4 and IPv6. I have been using
getaddrinfo with AF_UNSPEC to bind a wildcard server socket. (This is
the method recommended in Stevens UNP.)

In any case - my server code works fine on 4.6 and 4.7 binding to both
address families. However, I have just received a report of it only
binding the v6 address on a FreeBSD 5.0 system. (As reported from
"netstat -a -p tcp" - and by the fact that clients that try and use the
v4 address are unable to get a connection.)

It is behaving as if the IPV6_BINDV6ONLY sockopt is set... Has the
"default" value for this changed?

Is it recommended that any server that wants to bind to the dual-stack
needs to make sure this sockopt is unset? I am not doing that...

I just found the net.inet6.ip6.bindv6only sysctl variable doing a web
search... What is the default value for this sysctl on 5.0?

(I guess I may need to install 5.0 on a box, and stop bothering
others...)

Thanks,
jeff


More information about the freebsd-net mailing list