summaryrefslogtreecommitdiff
path: root/source4/nbt_server/nbt_server.h
AgeCommit message (Collapse)AuthorFilesLines
2009-01-19winsserver: we need to ignore duplicated name register requests.Stefan Metzmacher1-0/+2
This fixes the following bug: While we reply with a WACK response to a client. Instead of waiting for the final reply some windows client just resends the request using the same name_trn_id in the nbt_name_packet. We handled this as a new request and send a WACK response (and the challenges) again. Then the first request gets its final success response, but the when we try to send the success for the "second" request we notice that the record was changed in between and we return an error. Windows 2003 (and I assume all other versions as well) detect the packet is just a resent of a currently pending request and ignores it. So we now keep a list of all pending WINS name register requests which result in a WACK response. On each incoming name register request we search through the list to find duplicate requests and ignore them. In theory we should do that for all requests, but name register requests are the only requests we response async and only if we have to go via the WACK code path. metze (from samba4wins tree 382e7d384b70d03e9f81c7bb353afaed288d80f0)
2008-09-23s4-nbt: use ../libcli/nbtGünther Deschner1-1/+1
Guenther
2007-12-21r26401: Don't cache interfaces context in libnetif.Jelmer Vernooij1-0/+1
(This used to be commit 9f975417cc66bfd4589da38bfd23731dbe0e6153)
2007-10-10r23792: convert Samba4 to GPLv3Andrew Tridgell1-3/+2
There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
2007-10-10r20149: Remove the smb.conf distinction between PDC and BDC. Now the correctAndrew Bartlett1-0/+2
way to setup a Samba4 DC is to set 'server role = domain controller'. We use the fSMORoleOwner attribute in the base DN to determine the PDC. This patch is quite large, as I have corrected a number of places that assumed taht we are always the PDC, or that used the smb.conf lp_server_role() to determine that. Also included is a warning fix in the SAMR code, where the IDL has seperated a couple of types for group display enumeration. We also now use the ldb database to determine if we should run the global catalog service. In the near future, I will complete the DRSUAPI DsGetDomainControllerInfo server-side on the same basis. Andrew Bartlett (This used to be commit 67d8365e831adf3eaecd8b34dcc481fc82565893)
2007-10-10r17792: io.out.winsserver is a const char *,Stefan Metzmacher1-1/+1
and iname->winserver = talloc_steal(iname, io.out.winsserver) generated a warning, so I changed iname->winsserver to also be a const char *. then a talloc_free(iname->winsserver) would generate a warning, but we can steal it into the tmp_ctx without a warning and that gets free'ed a few lines later. metze (This used to be commit fdef17f81e5fc48cca3dd7611d6d5007147473b1)
2007-10-10r14464: Don't include ndr_BASENAME.h files unless strictly required, insteadJelmer Vernooij1-1/+1
try to include just the BASENAME.h files (containing only structs) (This used to be commit 3dd477ca5147f28a962b8437e2611a8222d706bd)
2007-10-10r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server.Jelmer Vernooij1-0/+2
(This used to be commit 87f665a1d5ba74289974bf9d8f9441c162e6f1b1)
2007-10-10r11048: r10539@SERNOX: metze | 2005-09-27 14:59:47 +0200Stefan Metzmacher1-6/+3
fix the build for changes from SAMBA_4_0 branch metze r10541@SERNOX: metze | 2005-09-27 15:05:33 +0200 use a transaction when we allocate a new version metze r10549@SERNOX: metze | 2005-09-27 18:58:37 +0200 - add first start of wins pull replication - we not yet apply records to our database but we fetch them correct form our partners (we need conflict handling for this) - we also need to filter out our own records! metze r10568@SERNOX: metze | 2005-09-28 11:33:04 +0200 move composite helpers to a seperate file, create a a seperate file for the conflict resolving logic metze r10571@SERNOX: metze | 2005-09-28 12:00:17 +0200 add forward declarations...to fix the build metze r10612@SERNOX: metze | 2005-09-29 16:11:06 +0200 we have a nbt_name now, and don't need to parse it metze r10614@SERNOX: metze | 2005-09-29 16:38:35 +0200 filter out our own records metze r10620@SERNOX: metze | 2005-09-29 18:07:08 +0200 - handle mutliple addresses in WREPL_REPL_SEND_REPLY - make strings always valid talloc pointers metze r10621@SERNOX: metze | 2005-09-29 18:09:41 +0200 use debug level 2 metze r10622@SERNOX: metze | 2005-09-29 18:48:05 +0200 - add one more debug message when we reply no record - fix min max logic metze r10623@SERNOX: metze | 2005-09-29 20:49:06 +0200 build fixes... metze r10629@SERNOX: metze | 2005-09-30 00:11:41 +0200 - use seperate attributes for type, state, nodetype, is_static ... the winserver.c code needs some more updates to correctly, create special group and multihomed registrations... metze r10640@SERNOX: metze | 2005-09-30 04:07:34 +0200 - add some short path for the composite helper functions they will be used in the next commit metze r10642@SERNOX: metze | 2005-09-30 06:29:06 +0200 fix the build metze r10655@SERNOX: metze | 2005-09-30 17:36:49 +0200 - implement the WREPL_REPL_UPDATE* and WREPL_REPL_INFORM* this includes the connection fliping into a client connection for WREPL_REPL_UPDATE* NOTE: I not yet found out how to get the w2k server to use INFORM against samba4 it uses inform against w2k and w2k3 but UPDATE against nt4 and samba4 what's left now is to be able to initiate INFORM and UPDATE requests to notify our pull partners metze r10727@SERNOX: metze | 2005-10-05 14:11:05 +0200 fix the build metze r10770@SERNOX: metze | 2005-10-06 16:56:01 +0200 - move the table filling to a seperate function, will be reused later - fix the build, wrepl_nbt_name fixes - remove state -> update_state metze r10771@SERNOX: metze | 2005-10-06 17:04:48 +0200 add a function to create a wreplsrv_in_connection from a client connection metze r10772@SERNOX: metze | 2005-10-06 17:13:51 +0200 - make the connection code more generic to handle the pull cached connection, push cached connection or given connections - when we don't use a cached connection, disconnection when a pull_cycle is done - fix the build and use the configured source ip metze r10773@SERNOX: metze | 2005-10-06 17:18:49 +0200 - add composite functions for push notification metze r10774@SERNOX: metze | 2005-10-06 17:23:46 +0200 - use periodic push notifycation, this is just for now as it needs to be configurable and and be triggered when the local database has changes since the last notify - I also need to work out how to decide if the partner supports persistent connections and WREPL_REPL_INFORM* messages metze r10923@SERNOX: metze | 2005-10-12 16:52:34 +0200 fix the build becuse of conflicts with main SAMBA_4_0 tree metze (This used to be commit 6d97dd6e50423758d081459ec551f4e04dfd818d)
2007-10-10r7321: add nbtd statistics serving over irpcAndrew Tridgell1-0/+4
(This used to be commit 4c0ed7328b14969ea34790b0e80fa714c44ccc5f)
2007-10-10r6184: the beginnings of the libcli/dgram/ library, and the dgramAndrew Tridgell1-0/+2
server. Currently just listens on port 138 and parses the packets (using IDL like the rest of NBT). This allows me to develop the structures and test with real packets (This used to be commit 10d64a525349ff96695ad961a3cfeb5bc7c8844f)
2007-10-10r5408: - added testing for the behaviour of the special 0x1c nameAndrew Tridgell1-0/+4
- added WINS server support for the 0x1c name (This used to be commit 1558a545285ae0432c70e0a3e2b132a5132e7b3b)
2007-10-10r5358: - added initial WINS server code. It passes most of the NBT-WINS ↵Andrew Tridgell1-2/+1
test, but doesn't yet do secure server WACK responses - added a ldap_string_to_time() function, for converting a LDAP formatted time to a time_t (This used to be commit 9aa3313b3f93e47e3f93028e072f6a23b3c22385)
2007-10-10r5346: - a bit more preparation for the WINS server going inAndrew Tridgell1-1/+4
- more NBT packet asserts, to ensure that incoming requests have all the elements we depend on - open the WINS database at startup if we are configured as a WINS server - split out the nbtd server reply packet generation code so it can be shared by the WINS server - re-did the logic of what is answered by the WINS server and what by the B node server. It now always tries to answer by the B node, and only "recurses" to the WINS server for names that are not found. (This used to be commit 5613e6b8ad9b32639caf5055f793dbc4d0a2fc19)
2007-10-10r5251: - renamed the nbtd server side structures to have a nbtd_ prefix, toAndrew Tridgell1-10/+18
be consistent with the function names - added WINS client support to the NBT server. It will do initial WINS registration, and WINS refresh, automatically failing over to secondary WINS servers and handling multi-homed servers where we need to register multiple IPs. - added support for multi-homed name query replies, which are essential for multi-homed registration as the WINS server will query us to ensure we have the names when doing the secondary IPs in multi-homed registration (This used to be commit a1553fa8054dc7d33f5d77f8f95d3ffd90392b2a)
2007-10-10r5210: changed server side nbt functions to be prefixed with nbtd_ instead ofAndrew Tridgell1-1/+1
nbt_, so as to more clearly separate them from the client code in libcli/nbt/ (This used to be commit b07a7e35f26204055a99abf72438b5cd7ec35d3b)
2007-10-10r5118: added support for node status replies in nbtd. nmblookup -S now works ↵Andrew Tridgell1-0/+7
against Samba4. Also added support for the '*' wildcard name (This used to be commit 2dd7ccf72444db668fa970c3a95de1448baea224)
2007-10-10r5114: the nbtd task can now act as a basic B-node server. It registers itsAndrew Tridgell1-1/+21
names on the network and answers name queries. Lots of details are still missing, but at least this now means you don't need a Samba3 nmbd to use Samba4. missing pieces include: - name registrations should be "shout 3 times, then demand" - no WINS server yet - no master browser code (This used to be commit d7d31fdc6670f026f96b50e51a4de19f0b920e5b)
2007-10-10r5108: the beginnings of a nbtd server for Samba4. Currently just displaysAndrew Tridgell1-0/+44
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)