Security: IPv4 mapped address ::ffff:127.0.0.1 Not distinguishable between the following two: IPv4 packet goes into AF_INET6 socket (kernel translates the address) IPv6 packet with ::ffff:127.0.0.1 Security holes Malicious party could circumvent access control Malicious party could make you generate unexpected IPv4 packet Solution Do not use IPv4 mapped address by setsockopt(IPv6_V6ONLY, 1) Open AF_INET socket for IPv4