diff options
author | Andreas Schneider <asn@samba.org> | 2011-03-07 17:26:42 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-03-08 11:41:31 +0100 |
commit | 794e0f5f0c015ddd210fc2277d6460dfc87022f8 (patch) | |
tree | 112f0beab8bc8e40ee96eb33ed625e88de536bb7 /source3 | |
parent | a955c53843fb96f931cdf6674f5a3dcf9fe56bd4 (diff) | |
download | samba-794e0f5f0c015ddd210fc2277d6460dfc87022f8.tar.gz samba-794e0f5f0c015ddd210fc2277d6460dfc87022f8.tar.bz2 samba-794e0f5f0c015ddd210fc2277d6460dfc87022f8.zip |
s3-rpc_server: Added IPv6 support for epmapper.
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3')
-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,"); ) { |