diff options
-rw-r--r-- | source3/rpc_server/epmd.c | 9 | ||||
-rw-r--r-- | source3/rpc_server/rpc_ep_setup.c | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/source3/rpc_server/epmd.c b/source3/rpc_server/epmd.c index 7bc1ebca89..352bc86409 100644 --- a/source3/rpc_server/epmd.c +++ b/source3/rpc_server/epmd.c @@ -64,6 +64,15 @@ static bool epmd_open_sockets(struct tevent_context *ev_ctx, const char *sock_ptr; char *sock_tok; + if (strequal(sock_addr, "0.0.0.0") || + strequal(sock_addr, "::")) { +#if HAVE_IPV6 + sock_addr = "::"; +#else + sock_addr = "0.0.0.0"; +#endif + } + for (sock_ptr = sock_addr; next_token_talloc(talloc_tos(), &sock_ptr, &sock_tok, " \t,"); ) { diff --git a/source3/rpc_server/rpc_ep_setup.c b/source3/rpc_server/rpc_ep_setup.c index d6efb0e3c3..32afa1d7bd 100644 --- a/source3/rpc_server/rpc_ep_setup.c +++ b/source3/rpc_server/rpc_ep_setup.c @@ -87,6 +87,15 @@ static uint16_t _open_sockets(struct tevent_context *ev_ctx, const char *sock_ptr; char *sock_tok; + if (strequal(sock_addr, "0.0.0.0") || + strequal(sock_addr, "::")) { +#if HAVE_IPV6 + sock_addr = "::"; +#else + sock_addr = "0.0.0.0"; +#endif + } + for (sock_ptr = sock_addr; next_token_talloc(talloc_tos(), &sock_ptr, &sock_tok, " \t,"); ) { |