The Samba-Bugzilla – Attachment 1688 Details for
Bug 3411
Failed to bind to 255.255.255.255:138 - NT_STATUS_ADDRESS_NOT_ASSOCIATED
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Ups. Reformatting is not good for patches.
samba4-nbt-bind-patch.diff (text/plain), 3.10 KB, created by
Oleg Sharoiko
on 2006-01-16 01:51:04 UTC
(
hide
)
Description:
Ups. Reformatting is not good for patches.
Filename:
MIME Type:
Creator:
Oleg Sharoiko
Created:
2006-01-16 01:51:04 UTC
Size:
3.10 KB
patch
obsolete
>Index: nbt_server/dgram/request.c >=================================================================== >--- nbt_server/dgram/request.c (revision 12957) >+++ nbt_server/dgram/request.c (working copy) >@@ -56,7 +56,7 @@ > */ > NTSTATUS nbtd_dgram_setup(struct nbtd_interface *iface, const char *bind_address) > { >- struct nbt_dgram_socket *bcast_dgmsock; >+ struct nbt_dgram_socket *bcast_dgmsock = NULL; > struct nbtd_server *nbtsrv = iface->nbtsrv; > struct socket_address *bcast_addr, *bind_addr; > NTSTATUS status; >@@ -69,31 +69,33 @@ > } > > /* listen for broadcasts on port 138 */ >- bcast_dgmsock = nbt_dgram_socket_init(iface, nbtsrv->task->event_ctx); >- if (!bcast_dgmsock) { >- talloc_free(tmp_ctx); >- return NT_STATUS_NO_MEMORY; >- } >+ if (strcmp(iface->netmask, "0.0.0.0") != 0) { >+ bcast_dgmsock = nbt_dgram_socket_init(iface, >+ nbtsrv->task->event_ctx); >+ if (!bcast_dgmsock) { >+ talloc_free(tmp_ctx); >+ return NT_STATUS_NO_MEMORY; >+ } > >- bcast_addr = socket_address_from_strings(tmp_ctx, bcast_dgmsock->sock->backend_name, >- iface->bcast_address, >- lp_dgram_port()); >+ bcast_addr = socket_address_from_strings(tmp_ctx, >+ bcast_dgmsock->sock->backend_name, >+ iface->bcast_address, >+ lp_dgram_port()); > >- status = socket_listen(bcast_dgmsock->sock, bcast_addr, 0, 0); >- if (!NT_STATUS_IS_OK(status)) { >- talloc_free(tmp_ctx); >- DEBUG(0,("Failed to bind to %s:%d - %s\n", >- iface->bcast_address, lp_dgram_port(), nt_errstr(status))); >- return status; >+ status = socket_listen(bcast_dgmsock->sock, bcast_addr, 0, 0); >+ if (!NT_STATUS_IS_OK(status)) { >+ talloc_free(tmp_ctx); >+ DEBUG(0,("Failed to bind to %s:%d - %s\n", >+ iface->bcast_address, lp_dgram_port(), >+ nt_errstr(status))); >+ return status; >+ } >+ talloc_free(bcast_addr); >+ >+ dgram_set_incoming_handler(bcast_dgmsock, dgram_request_handler, >+ iface); > } >- talloc_free(bcast_addr); >- >- dgram_set_incoming_handler(bcast_dgmsock, dgram_request_handler, iface); > >- bind_addr = socket_address_from_strings(tmp_ctx, bcast_dgmsock->sock->backend_name, >- bind_address, >- lp_dgram_port()); >- > /* listen for unicasts on port 138 */ > iface->dgmsock = nbt_dgram_socket_init(iface, nbtsrv->task->event_ctx); > if (!iface->dgmsock) { >@@ -101,6 +103,11 @@ > return NT_STATUS_NO_MEMORY; > } > >+ bind_addr = socket_address_from_strings(tmp_ctx, >+ iface->dgmsock->sock->backend_name, >+ bind_address, >+ lp_dgram_port()); >+ > status = socket_listen(iface->dgmsock->sock, bind_addr, 0, 0); > if (!NT_STATUS_IS_OK(status)) { > talloc_free(tmp_ctx); >@@ -121,10 +128,12 @@ > we need */ > struct dgram_mailslot_handler *dgmslot; > >- dgmslot = dgram_mailslot_listen(bcast_dgmsock, >- mailslot_handlers[i].mailslot_name, >- mailslot_handlers[i].handler, iface); >- NT_STATUS_HAVE_NO_MEMORY(dgmslot); >+ if (bcast_dgmsock != NULL) { >+ dgmslot = dgram_mailslot_listen(bcast_dgmsock, >+ mailslot_handlers[i].mailslot_name, >+ mailslot_handlers[i].handler, iface); >+ NT_STATUS_HAVE_NO_MEMORY(dgmslot); >+ } > > dgmslot = dgram_mailslot_listen(iface->dgmsock, > mailslot_handlers[i].mailslot_name,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3411
: 1688