s4:rpc_server/remote: fail the connection if the remote server don't support MPX
authorStefan Metzmacher <metze@samba.org>
Fri, 23 Nov 2018 13:21:45 +0000 (14:21 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 12 Jan 2019 02:13:39 +0000 (03:13 +0100)
If we already negotiated with our client to support concurent multiplexing (MPX),
we need a remote connection that also supports it.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/rpc_server/remote/dcesrv_remote.c

index 4a441f34b232e2bc294292b5e7db1278097fbaae..9e40a974e0c05e878c617941229f90bde5dcb6d6 100644 (file)
@@ -179,9 +179,13 @@ static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct
                return status;
        }
 
-       flags = dcerpc_binding_get_flags(priv->c_pipe->binding);
-       if (!(flags & DCERPC_CONCURRENT_MULTIPLEX)) {
-               dce_call->state_flags &= ~DCESRV_CALL_STATE_FLAG_MULTIPLEXED;
+       if (dce_call->pkt.pfc_flags & DCERPC_PFC_FLAG_CONC_MPX) {
+               flags = dcerpc_binding_get_flags(priv->c_pipe->binding);
+               if (!(flags & DCERPC_CONCURRENT_MULTIPLEX)) {
+                       DEBUG(1,("dcerpc_remote: RPC Proxy: "
+                                "Remote server doesn't support MPX\n"));
+                       return NT_STATUS_INVALID_NETWORK_RESPONSE;
+               }
        }
 
        if (dce_call->conn->assoc_group->proxied_id == 0) {