On 2012-05-13 02:37, Phil Pennock wrote: > On 2012-05-12 at 21:00 +0100, Jeremy Harris wrote:
>> Basic-ipv6/1001 recognizing IPv6 address in HELO/EHLO
>> ===============f test-mainlog-munged with log/1001 failed
>> Line 11 of "test-mainlog-munged" does not match line 11 of "log/1001".
>> ----------
>> 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 (IPv6 with IPv4)
>> ----------
>> 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 (IPv6 and IPv4)
>
>> Note the one-word difference (with vs. and). It relates to
>> how interfaces and addresses are laid out, somehow
>> (cf. daemon.c 1640, 1644).
>
> On some OSes, an IPv6 socket can accept connections made with both IPv4
> and IPv6 protocols, and will use IPv6-mapped IPv4 addresses in that case
> (::ffff:ipv4 I think).
>
> On some OSes, an IPv6 socket can't.
>
> On some OSes, it's choosable, both as a system-wide default and as a
> per-socket option. OpenBSD defaulted this off, reasoning that unaware
> developers not knowing how to handle ::ffff:ipv4 address forms would
> mess up their ACL logic.
>
> Eg, FreeBSD sysctl "net.inet6.ip6.v6only" for the system-wide knob. And
> later socket standards added IPV6_V6ONLY as a sockopt at socket level
> IPPROTO_IPV6.
>
> Are you testing on two different systems with different defaults, or
> could some daemon's startup script be doing something stupid like tuning
> the system-wide default?
I'm only testing on the one system; Scientific Linux 6 (a Fedora derivative).
The coding looking for that dual-use socket is (IMHO) highly dubious. It will
false-pos when the IPv4 socket gets a "real" EADDRINUSE. I think I'm
getting such - I'm also getting them for the initial (wildcard) socket
whether IPv4 or v6. They seem to last 5-10 seconds.
The manpage claims IPV6_V6ONLY is supported.
Testcase 0561 is my current repeat-by for IPv4; 1001 for IPv6.