Subject: Disable IPv4-mapped - enforce IPV6_V6ONLY

From: Alexander Holler <[email-masked]>
Date: Fri, 22 Feb 2013 16:21:26 +0100

Hello,

I'm searching for a way to either enforce IPV6_V6ONLY or to block 
IPv4-mapped addresses on ipv6-sockets (e.g. by using iptables) system-wide.

E.g. net.ipv6.bindv6only doesn't help if something calls

int v6on = 0;
setsockopt(sd, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&v6on, sizeof(v6on))

In such a case I still want to disable or block IPv4-mapped addresses on 
that socket, even if the program thinks it nows it better.

Until now I haven't found a solution.

Regards,

Alexander