summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-30 10:24:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:23 -0500
commitc7ded5ab0accc54a28df4d43cb923e6c808ff347 (patch)
treeeabb1e05c05f8ce01b0ffbf1fda038a80fc237a0 /source4/smbd
parenta0ab1f7afda62964d480af9dc26e60a38d1350e0 (diff)
downloadsamba-c7ded5ab0accc54a28df4d43cb923e6c808ff347.tar.gz
samba-c7ded5ab0accc54a28df4d43cb923e6c808ff347.tar.bz2
samba-c7ded5ab0accc54a28df4d43cb923e6c808ff347.zip
r5108: the beginnings of a nbtd server for Samba4. Currently just displays
the packets it receives, but it at least shows how the server structure will work. To implement it I extended the libcli/nbt/ library to allow for an incoming packet handler to be registered. That allows the nbt client library to be used for low level processing of the nbtd server packets. Other changes: - made the socket library always set SO_REUSEADDR when binding to an interface, to ensure that restarts of a server don't have to wait for a couple of minutes. - made the nbt port configurable. Defaults to 137, but other ports will be useful for testing. (This used to be commit 2fedca6adfd4df9e85cc86896dfa79630777a917)
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/config.mk10
-rw-r--r--source4/smbd/service_stream.c2
2 files changed, 11 insertions, 1 deletions
diff --git a/source4/smbd/config.mk b/source4/smbd/config.mk
index 4d5e929c79..39697205f6 100644
--- a/source4/smbd/config.mk
+++ b/source4/smbd/config.mk
@@ -40,6 +40,16 @@ REQUIRED_SUBSYSTEMS = \
# End MODULE server_ldap
################################################
+################################################
+# Start MODULE server_service_nbtd
+[MODULE::server_service_nbtd]
+INIT_FUNCTION = server_service_nbtd_init
+SUBSYSTEM = SERVER_SERVICE
+REQUIRED_SUBSYSTEMS = \
+ NBTD
+# End MODULE server_service_nbtd
+################################################
+
#######################
# Start SUBSYSTEM SERVICE
[SUBSYSTEM::SERVER_SERVICE]
diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c
index 0d29c9fcb8..1662e9005f 100644
--- a/source4/smbd/service_stream.c
+++ b/source4/smbd/service_stream.c
@@ -170,7 +170,7 @@ NTSTATUS stream_setup_socket(struct event_context *event_context,
talloc_steal(stream_socket, stream_socket->sock);
/* ready to listen */
- status = socket_set_option(stream_socket->sock, "SO_KEEPALIVE SO_REUSEADDR=1", NULL);
+ status = socket_set_option(stream_socket->sock, "SO_KEEPALIVE", NULL);
NT_STATUS_NOT_OK_RETURN(status);
status = socket_set_option(stream_socket->sock, lp_socket_options(), NULL);