From: Gerald (Jerry) Carter Date: Fri, 3 Oct 2008 15:51:54 +0000 (-0500) Subject: net_dns: Make "lwinet ads dns register" honor the "interfaces" parameter. X-Git-Tag: samba-4.0.0alpha6~769^2~228^2~83^2 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=c7625979ceb350d90d87d2add6ed7156440072c3 net_dns: Make "lwinet ads dns register" honor the "interfaces" parameter. This is helpful on multihomed hosts that only require a subset of IP addresses be registered with DNS. --- diff --git a/source3/utils/net_dns.c b/source3/utils/net_dns.c index 14d45e2b0fc..46f38d42f66 100644 --- a/source3/utils/net_dns.c +++ b/source3/utils/net_dns.c @@ -150,9 +150,10 @@ int get_my_ip_address( struct sockaddr_storage **pp_ss ) struct sockaddr_storage *list = NULL; int count = 0; - /* find the first non-loopback address from our list of interfaces */ + /* Honor the configured list of interfaces to register */ - n = get_interfaces(nics, MAX_INTERFACES); + load_interfaces(); + n = iface_count(); if (n <= 0) { return -1; @@ -163,19 +164,17 @@ int get_my_ip_address( struct sockaddr_storage **pp_ss ) } for ( i=0; i