With IPv4, I can bind () to a specific address to select the interface that will be used to receive packets (and in some cases also send, but that's not the point).
On a machine with two IPv6 / IPV4 stacks, I have this problem: I can create socket 6 and use it to receive 4 traffic, but if I want to bind to a specific interface, I need to select an IP address to bind to.
If I bind to an IPv6 address, I will filter out all IPv4 traffic and vice versa.
How can I get IPv4 and IPv6 traffic from a specific interface?
source share