struct dcerpc_call *call;
bool valid_type = false;
bool allow_fragments = false;
+ bool allow_newcall = false;
+ bool allow_ignore = false;
conn->loop.subreq = NULL;
/* Ordinary request. */
valid_type = true;
allow_fragments = true;
+ allow_newcall = true;
break;
case DCERPC_PKT_PING:
case DCERPC_PKT_BIND:
/* Bind to interface. */
valid_type = true;
+ allow_newcall = true;
break;
case DCERPC_PKT_BIND_ACK:
case DCERPC_PKT_ALTER:
/* Alter auth. */
valid_type = true;
+ allow_newcall = true;
break;
case DCERPC_PKT_ALTER_RESP:
break;
case DCERPC_PKT_AUTH3:
- /* not the real name! this is undocumented! */
+ /* Auth3 request */
valid_type = true;
+ allow_newcall = true;
break;
case DCERPC_PKT_SHUTDOWN:
case DCERPC_PKT_CO_CANCEL:
/* Connection-oriented cancel request. */
valid_type = true;
+ allow_ignore = true;
break;
case DCERPC_PKT_ORPHANED:
- /* Client telling server it's aborting a partially sent request or telling server to stop sending replies. */
+ /*
+ * Client telling server it's aborting a partially sent request
+ * or telling server to stop sending replies.
+ */
valid_type = true;
+ allow_ignore = true;
break;
case DCERPC_PKT_RTS:
}
}
- if (call == NULL) {
+ if (call == NULL && allow_newcall) {
call = conn->calls.new_call;
}
+ if (call == NULL && allow_ignore) {
+ TALLOC_FREE(subreq);
+ goto may_restart;
+ }
+
if (call == NULL) {
TALLOC_FREE(subreq);
dcerpc_connection_dead(conn, NT_STATUS_RPC_PROTOCOL_ERROR);
return;
}
+may_restart:
if (conn->calls.new_call == NULL) {
conn->loop.ev = NULL;
return;