summaryrefslogtreecommitdiffstats
path: root/source4/wrepl_server/wrepl_server.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-10-14 12:44:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:41:30 -0500
commitd49e67f06f55054f23dbef609b4debb11c157ffa (patch)
treea52ff716f74cd2c2f3efd73e88f9d6465156e1f7 /source4/wrepl_server/wrepl_server.h
parentee49ed7a204753e0755f79304a2d4ac32f6e8fdf (diff)
downloadsamba-d49e67f06f55054f23dbef609b4debb11c157ffa.tar.gz
samba-d49e67f06f55054f23dbef609b4debb11c157ffa.tar.xz
samba-d49e67f06f55054f23dbef609b4debb11c157ffa.zip
r11014: r10139@SERNOX: metze | 2005-09-10 10:32:36 +0200
- w2k just ignores invalid packets, so we do now - w2k only checks the assoc_ctx when the opcode has the sepcific obcode bit's set - terminate the connection, when getting a WREPL_STOP_ASSOCIATION packet - some more special error handling proper torture test for all this cases are following later metze (This used to be commit 42b69461aad3942dde361d61b950445dd39882aa)
Diffstat (limited to 'source4/wrepl_server/wrepl_server.h')
-rw-r--r--source4/wrepl_server/wrepl_server.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/wrepl_server/wrepl_server.h b/source4/wrepl_server/wrepl_server.h
index f8bd59dbdb2..bbf4a4b98f9 100644
--- a/source4/wrepl_server/wrepl_server.h
+++ b/source4/wrepl_server/wrepl_server.h
@@ -27,6 +27,9 @@ struct wreplsrv_partner;
struct wreplsrv_pull_partner_item;
struct wreplsrv_push_partner_item;
+#define WREPLSRV_VALID_ASSOC_CTX 0x12345678
+#define WREPLSRV_INVALID_ASSOC_CTX 0x0000000a
+
/*
state of an incoming wrepl call
*/
@@ -60,6 +63,13 @@ struct wreplsrv_in_connection {
*/
const char *our_ip;
+ /* keep track of the assoc_ctx's */
+ struct {
+ BOOL stopped;
+ uint32_t our_ctx;
+ uint32_t peer_ctx;
+ } assoc_ctx;
+
/* the partial input on the connection */
DATA_BLOB partial;
size_t partial_read;
@@ -70,6 +80,12 @@ struct wreplsrv_in_connection {
*/
BOOL processing;
+ /*
+ * if this is set we no longer accept incoming packets
+ * and terminate the connection after we have send all packets
+ */
+ BOOL terminate;
+
/* the list of outgoing DATA_BLOB's that needs to be send */
struct data_blob_list_item *send_queue;
};