[Libwebsockets] Binding to IPv4 source address fails with IPv6 enabled

Mateusz Stępień mateusz.stepien at netrounds.com
Thu Mar 7 10:18:45 CET 2019

On 3/7/19 5:52 AM, Andy Green wrote:
> You get the same results, or something different?

I am reproducing this in a following way:

I have a server running on a Linux in a VM, which is connected with 
interface vboxnet0 to the host. Host and guest are able to communicate 
through this interface with an address

I have a second interface, vboxnet1, which is not connected to the VM, 
and it has IP address assigned on the host side,

The client connects to the server on address, but I'm 
binding it to the address With this configuration I 
expect, that the client would not be able connect to the server, and 
that is the case with IPv6 support DISABLED. With IPv6 support enabled,
socket is bound to ([::], AF_INET6), as explained it the previous post, 
thus it manages to connect to the server.

I hope that this explanation is sufficient.


More information about the Libwebsockets mailing list