summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2016-09-15 18:17:44 +0200
committerAndreas Schneider <asn@cryptomilk.org>2016-10-26 11:20:17 +0200
commitf44282ca07b130379043ac64ebcd6b0bb0975458 (patch)
treeda897cc2a7b14ca0fa681d88a5287749f6720127 /source4/librpc
parent5bad44776826cf4e53920065e07013476d58e110 (diff)
downloadsamba-f44282ca07b130379043ac64ebcd6b0bb0975458.tar.gz
s4:librpc/rpc: make sure the DCERPC_CONCURRENT_MULTIPLEX and DCERPC_PFC_FLAG_CONC_MPX are in sync
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/dcerpc.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 8a96f01e8a0..7816aca3220 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -1220,11 +1220,26 @@ static void dcerpc_bind_recv_handler(struct rpc_request *subreq,
flags = dcerpc_binding_get_flags(state->p->binding);
- if ((flags & DCERPC_CONCURRENT_MULTIPLEX) &&
- (pkt->pfc_flags & DCERPC_PFC_FLAG_CONC_MPX)) {
- conn->flags |= DCERPC_CONCURRENT_MULTIPLEX;
+ if (flags & DCERPC_CONCURRENT_MULTIPLEX) {
+ if (pkt->pfc_flags & DCERPC_PFC_FLAG_CONC_MPX) {
+ conn->flags |= DCERPC_CONCURRENT_MULTIPLEX;
+ } else {
+ conn->flags &= ~DCERPC_CONCURRENT_MULTIPLEX;
+ }
}
+ if (!(conn->flags & DCERPC_CONCURRENT_MULTIPLEX)) {
+ struct dcerpc_binding *pb =
+ discard_const_p(struct dcerpc_binding, state->p->binding);
+ /*
+ * clear DCERPC_CONCURRENT_MULTIPLEX
+ */
+ status = dcerpc_binding_set_flags(pb, 0,
+ DCERPC_CONCURRENT_MULTIPLEX);
+ if (tevent_req_nterror(req, status)) {
+ return;
+ }
+ }
if ((conn->flags & DCERPC_PROPOSE_HEADER_SIGNING) &&
(pkt->pfc_flags & DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN)) {
conn->flags |= DCERPC_HEADER_SIGNING;