mirror of
https://github.com/samba-team/samba.git
synced 2025-08-07 09:49:30 +03:00
r13505: allow servers to bind to non-broadcast interfaces. Servers now
specifically ask for iface_n_bcast() and have to check if it returns
NULL, in which case it is a non-broadcast interface
(This used to be commit d004e250b6
)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
8c7a593bcd
commit
048704a7e5
@ -245,9 +245,15 @@ NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv)
|
||||
}
|
||||
|
||||
for (i=0; i<num_interfaces; i++) {
|
||||
const char *address = talloc_strdup(tmp_ctx, iface_n_ip(i));
|
||||
const char *bcast = talloc_strdup(tmp_ctx, iface_n_bcast(i));
|
||||
const char *netmask = talloc_strdup(tmp_ctx, iface_n_netmask(i));
|
||||
const char *bcast = iface_n_bcast(i);
|
||||
const char *address, *netmask;
|
||||
|
||||
/* we can't assume every interface is broadcast capable */
|
||||
if (bcast == NULL) continue;
|
||||
|
||||
address = talloc_strdup(tmp_ctx, iface_n_ip(i));
|
||||
bcast = talloc_strdup(tmp_ctx, bcast);
|
||||
netmask = talloc_strdup(tmp_ctx, iface_n_netmask(i));
|
||||
|
||||
status = nbtd_add_socket(nbtsrv, address, address, bcast, netmask);
|
||||
NT_STATUS_NOT_OK_RETURN(status);
|
||||
|
Reference in New Issue
Block a user