On Wed, 19 Jan 2022 13:07:33 +0000
Chris Vine <vine35792...@gmail.com> wrote:
[snip]
> As I understand it, with linux IPv6 sockets are dual stack capable, and
> in earlier kernel versions this was be enabled by default.  I believe
> with current versions that is no longer the case, and that you have to
> specifically enable dual stack by turning off IPV6_V6ONLY using
> setsockopt before binding on the socket.
> 
> Then, if receiving a IPv4 connection from address 1.2.3.4, this would be
> mapped as ::::ffff:1.2.3.4.
> 
> I do not know about other OSes.  I have half a memory that some earlier
> versions of windows did not support dual stack sockets (XP?).

By the way I did use dual stack some years ago, and I cannot now
remember all the details, but I think I may have had to bind on
in6addr_any (which in dual stack would cover INADDR_ANY) or on ::
(which would cover 127.0.0.1) to get dual stack to work.  I suggest you
play around with it to see.

One other correction: when I said there was a mapping to ::::ffff:
1.2.3.4 I meant ::ffff:1.2.3.4.

Reply via email to