[stunnel-users] port-only accept value binds to 127.0.0.1, instead of the wildcard address
org.stunnel at pooryorick.com
Wed May 30 19:40:05 CEST 2018
The stunnel 6.45 documentation for "accept" states,
"If no host specified, defaults to all IPv4 addresses for the local host."
In this case, stunnel actually binds to 127.0.0.1. Indeed, inspection of the
relevant code paths reveals that addr_list->passive is never set to 1 in this
case. To get stunnel to bind to all addresses, 0.0.0.0 must be explicitly
Furthermore, inspection of the code path for the "local" option reveals that
addr_list->passive is set to 1 in this case, which seems to be backwards: The
documentation for getaddrinfo states that AI_PASSIVE is ignored in this case.
The logic for these two cases seems to be reversed.
More information about the stunnel-users