On Mon, Oct 20, 2003 at 01:29:07PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote: > In article <[🔎] 20031020041936.GA11127@galacticasoftware.com> (at Sun, 19 Oct 2003 23:19:36 -0500), "Adam Majer" <adamm@galacticasoftware.com> says: > > > same port on IPv4... [yes, I know, this is a "feature" of linux 2.4]. > > ie. you will NOT be able to connect from remote IPv4 clients. > > That WAS a feature of linux 2.4. > current 2.4 supports IPV6_V6ONLY socket option. OK, I tried this, *BUT*, the problem just switched to the other protocol. Now I cannot "bind" to IPV6 :( if( r->ai_family == AF_INET6 ){ struct protoent * pe = getprotobyname( "ipv6" ); if( pe && setsockopt( *s, IPPROTO_IPV6/*pe->p_proto*/, IPV6_V6ONLY, &on, sizeof(on)) ==$ syslog( LOG_DEBUG, "setsockopt() failed: %m"); } PRIV_START; error = bind(*s, r->ai_addr, r->ai_addrlen); PRIV_END; if (error < 0) { syslog(LOG_DEBUG, "bind(): %m"); close (*s); continue; } NOTE: No errors are reported here! both bind() and setsockopt() succeed... The kernel I'm using now is the 2.6.0-test5 In lpd/lpd.c it seems to listen() on all of the sockets.... I don't know why it would not show in # netstat -tan tcp 0 0 0.0.0.0:515 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:37 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:7 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:9 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:13 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:624 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:19 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:9433 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN tcp6 0 0 ::ffff:192.168.53:32859 ::ffff:192.25.206.10:80 ESTABLISHED tcp6 0 0 ::ffff:192.168.53:32857 ::ffff:192.25.206.10:80 TIME_WAIT tcp6 0 0 ::ffff:192.168.53:32862 ::ffff:192.25.206.10:80 ESTABLISHED tcp6 0 0 ::ffff:192.168.53:32861 ::ffff:192.25.206.10:80 ESTABLISHED Anyway, the version with the IPV6_V6ONLY is the test2 one http://people.debian.org/~adamm/ Does it work elsewhere? - Adam
Attachment:
signature.asc
Description: Digital signature