svn commit: samba r5172 - in branches/SAMBA_4_0/source/nbt_server: .

tridge at samba.org tridge at samba.org
Wed Feb 2 10:35:26 GMT 2005


Author: tridge
Date: 2005-02-02 10:35:25 +0000 (Wed, 02 Feb 2005)
New Revision: 5172

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5172

Log:
actually bind to the right address for the wildcard interface ....


Modified:
   branches/SAMBA_4_0/source/nbt_server/interfaces.c


Changeset:
Modified: branches/SAMBA_4_0/source/nbt_server/interfaces.c
===================================================================
--- branches/SAMBA_4_0/source/nbt_server/interfaces.c	2005-02-02 10:29:50 UTC (rev 5171)
+++ branches/SAMBA_4_0/source/nbt_server/interfaces.c	2005-02-02 10:35:25 UTC (rev 5172)
@@ -63,6 +63,7 @@
   start listening on the given address
 */
 static NTSTATUS nbt_add_socket(struct nbt_server *nbtsrv, 
+			       const char *bind_address, 
 			       const char *address, 
 			       const char *bcast, 
 			       const char *netmask)
@@ -106,7 +107,7 @@
 	iface->nbtsock = nbt_name_socket_init(iface, nbtsrv->task->event_ctx);
 	NT_STATUS_HAVE_NO_MEMORY(iface->ip_address);
 
-	status = socket_listen(iface->nbtsock->sock, address, lp_nbt_port(), 0, 0);
+	status = socket_listen(iface->nbtsock->sock, bind_address, lp_nbt_port(), 0, 0);
 	if (!NT_STATUS_IS_OK(status)) {
 		DEBUG(0,("Failed to bind to %s:%d - %s\n", 
 			 address, lp_nbt_port(), nt_errstr(status)));
@@ -157,6 +158,7 @@
 		NT_STATUS_HAVE_NO_MEMORY(primary_address);
 
 		status = nbt_add_socket(nbtsrv, 
+					"0.0.0.0",
 					primary_address,
 					talloc_strdup(tmp_ctx, "255.255.255.255"),
 					talloc_strdup(tmp_ctx, "0.0.0.0"));
@@ -168,7 +170,7 @@
 		const char *bcast   = talloc_strdup(tmp_ctx, sys_inet_ntoa(*iface_n_bcast(i)));
 		const char *netmask = talloc_strdup(tmp_ctx, sys_inet_ntoa(*iface_n_netmask(i)));
 
-		status = nbt_add_socket(nbtsrv, address, bcast, netmask);
+		status = nbt_add_socket(nbtsrv, address, address, bcast, netmask);
 		NT_STATUS_NOT_OK_RETURN(status);
 	}
 



More information about the samba-cvs mailing list