[stunnel-users] port-only accept value binds to, instead of the wildcard address

Poor Yorick 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  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, 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 mailing list