summaryrefslogtreecommitdiffstats
path: root/source4/lib/socket/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/socket/interface.c')
-rw-r--r--source4/lib/socket/interface.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/source4/lib/socket/interface.c b/source4/lib/socket/interface.c
index 7a4733f4666..cdfadc9953c 100644
--- a/source4/lib/socket/interface.c
+++ b/source4/lib/socket/interface.c
@@ -505,27 +505,11 @@ bool iface_list_same_net(const char *ip1, const char *ip2, const char *netmask)
*/
const char **iface_list_wildcard(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx)
{
- const char **ret;
- ret = (const char **)str_list_make(mem_ctx, "0.0.0.0", NULL);
- if (ret == NULL) return NULL;
-
+ char **ret;
#ifdef HAVE_IPV6
- if (lpcfg_parm_bool(lp_ctx, NULL, "ipv6", "enable", true)) {
- struct interface *local_interfaces = NULL;
-
- load_interface_list(ret, lp_ctx, &local_interfaces);
-
- if (iface_list_first_v6(local_interfaces)) {
- TALLOC_FREE(local_interfaces);
- /*
- * only add "::" if we have at least
- * one ipv6 interface
- */
- return str_list_add(ret, "::");
- }
- TALLOC_FREE(local_interfaces);
- }
+ ret = str_list_make(mem_ctx, "::,0.0.0.0", NULL);
+#else
+ ret = str_list_make(mem_ctx, "0.0.0.0", NULL);
#endif
-
- return ret;
+ return discard_const_p(const char *, ret);
}