[cvsnt] ipv6 handling in cvsnt is broken

Tony Hoyle tony.hoyle at march-hare.com
Sat Nov 8 23:35:52 GMT 2008


Arkadiusz Miskiewicz wrote:
> IPv6 support seems quite broken in cvsnt (looking at 2.5.04.3236)
> 
> It doesn't support [ipv6]:port notation, binds to ::1 port while it should 
> bind to ipv4 address, too (cvslockd as example. Server tries to 
> use "localhost" name which resolves only to 127.0.0.1 address, tries to 
> connect to it but lockserver is available only at ::1).
> 
The production cvs.cvsnt.org server has been running on ipv6 for several 
years with no issues.  All the test boxes at the Salford site are ipv6 
enabled as well*.

cvslockd (and cvsservice, which is substantially the same code) binds to 
all available protocols, not limited to ipv4 and ipv6 even (it doesn't 
care).

On many OSs (linux for example) binding to ::1 causes an automatic bind 
to 127.0.0.1, which causes the second bind to fail, but that's expected 
and entirely harmless.  OTOH On Windows where the stacks are separate 
both binds succeed and you get the same effect of it listening on both.

cvsnt doesn't specifically support *any* notation - that's 100% an OS 
issue.  It merely passes it to the OS support routines.  It'd probably 
work over IPX if someone were mad enough to try it..

If you want to specify the lockserver at ip6-localhost then then you can 
- although it's entirely pointless unless you're trying to run a single 
stack ipv6 host, and I've never seen that done on a production machine 
as there's so much software that simply won't work in that environment.

Example: on cvs.cvsnt.org
$ netstat -an | grep 2401 | grep LISTEN
tcp6       0      0 :::2401                 :::* 
LISTEN

$ telnet 127.0.0.1 2401
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.

$ telnet [::1]:2401
Trying ::1...
Connected to ip6-localhost (::1).
Escape character is '^]'.

Tony

* Not in Australia.. Arthur doesn't like ipv6 :p


More information about the cvsnt mailing list