What was the motivation for adding the IPV6_V6ONLY flag?

前端 未结 7 1385
攒了一身酷
攒了一身酷 2021-02-07 00:39

In IPv6 networking, the IPV6_V6ONLY flag is used to ensure that a socket will only use IPv6, and in particular that IPv4-to-IPv6 mapping won\'t be used for that socket. On many

7条回答
  •  青春惊慌失措
    2021-02-07 00:50

    I don't know why it would be default; but it's the kind of flags that i would always put explicit, no matter what the default is.

    About why does it exist in the first place, i guess that it allows you to keep existing IPv4-only servers, and just run new ones on the same port but just for IPv6 connections. Or maybe the new server can simply proxy clients to the old one, making the IPv6 functionality easy and painless to add to old services.

提交回复
热议问题