Skip to content

conncheck: don't ignore local socket errors

With this patch we ensure that local socket errors during connection establishment are properly transmitted to the connection check layer, so the related pair can be put in state failed when needed. The local socket errors we are interested in, are those occurring when the local source address cannot be bound anymore, because the underlying network interface vanished for example. Another situation where a local socket error can be immediately detected and reported is, when an udp bsd socket cannot send a packet because there's a local firewall rule that prevents it.

In particular, we don't ignore errors coming from g_socket_bind() with tcp active sockets, that perform a bind to whatever local address is available, in case it cannot bind to the specified address.

This behavior was demonstrated with the test-tcp example, that tries to bind to the IPv4 loopback address on a socket initially created for the IPv6 loopback.

Edited by Olivier Crête

Merge request reports