diff options
author | Jeremy Allison <jra@samba.org> | 2014-06-05 12:32:30 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-06-07 01:01:43 +0200 |
commit | 463311422ca1caad2e228deb630e9d12e212fae1 (patch) | |
tree | 324fd1fe5b7cc2b1413879ea01d94b77f27c8ef1 /source4/dns_server | |
parent | 7091755c5834f74170b26a6f1e59c98a9051260d (diff) | |
download | samba-463311422ca1caad2e228deb630e9d12e212fae1.tar.gz samba-463311422ca1caad2e228deb630e9d12e212fae1.tar.xz samba-463311422ca1caad2e228deb630e9d12e212fae1.zip |
s3/s4: smbd, rpc, ldap, cldap, kdc services.
Allow us to start if we bind to *either* :: or 0.0.0.0.
Allows us to cope with systems configured as only IPv4
or only IPv6.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-By: Amitay Isaacs <amitay@gmail.com>
Reviewed-By: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jun 7 01:01:44 CEST 2014 on sn-devel-104
Diffstat (limited to 'source4/dns_server')
-rw-r--r-- | source4/dns_server/dns_server.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/dns_server/dns_server.c b/source4/dns_server/dns_server.c index 60ce27c6ff..7ea70dbcf2 100644 --- a/source4/dns_server/dns_server.c +++ b/source4/dns_server/dns_server.c @@ -693,6 +693,7 @@ static NTSTATUS dns_startup_interfaces(struct dns_server *dns, NT_STATUS_NOT_OK_RETURN(status); } } else { + int num_binds = 0; char **wcard; wcard = iface_list_wildcard(tmp_ctx); if (wcard == NULL) { @@ -702,7 +703,13 @@ static NTSTATUS dns_startup_interfaces(struct dns_server *dns, for (i = 0; wcard[i] != NULL; i++) { status = dns_add_socket(dns, model_ops, "dns", wcard[i], DNS_SERVICE_PORT); - NT_STATUS_NOT_OK_RETURN(status); + if (NT_STATUS_IS_OK(status)) { + num_binds++; + } + } + if (num_binds == 0) { + talloc_free(tmp_ctx); + return NT_STATUS_INVALID_PARAMETER_MIX; } } |