How to support both IPv4 and IPv6 connections

后端 未结 4 837
南旧
南旧 2020-12-02 05:59

I\'m currently working on a UDP socket application and I need to build in support so that IPV4 and IPV6 connections can send packets to a server.

I was hoping that

4条回答
  •  执笔经年
    2020-12-02 06:32

    I've been playing with this under Windows and it actually does appear to be a security issue there, if you bind to the loopback address then the IPv6 socket is correctly bound to [::1] but the mapped IPv4 socket is bound to INADDR_ANY, so your (supposedly) safely local-only app is actually exposed to the world.

提交回复
热议问题