提交 b6f3a40c 编写于 作者: T Tim Smith 提交者: David Howells

af_rxrpc: Prevent RxRPC peers from ABORT-storming one another

When an ABORT is sent, aborting a connection, the sender quite reasonably
forgets about the connection.  If another frame is received, another ABORT
will be sent.  When the receiver gets it, it no longer applies to an extant
connection, so an ABORT is sent, and so on...

Prevent this by never sending a rejection for an ABORT packet.
Signed-off-by: NTim Smith <tim@electronghost.co.uk>
Signed-off-by: NDavid Howells <dhowells@redhat.com>
上级 8961749e
......@@ -606,8 +606,10 @@ static void rxrpc_post_packet_to_call(struct rxrpc_connection *conn,
}
_debug("dead call");
if (sp->hdr.type != RXRPC_PACKET_TYPE_ABORT) {
skb->priority = RX_CALL_DEAD;
rxrpc_reject_packet(conn->trans->local, skb);
}
goto done;
/* resend last packet of a completed call
......@@ -790,8 +792,10 @@ void rxrpc_data_ready(struct sock *sk, int count)
skb->priority = RX_CALL_DEAD;
}
_debug("reject");
if (sp->hdr.type != RXRPC_PACKET_TYPE_ABORT) {
_debug("reject type %d",sp->hdr.type);
rxrpc_reject_packet(local, skb);
}
rxrpc_put_local(local);
_leave(" [no call]");
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册