diff options
author | Tim Smith <tim@electronghost.co.uk> | 2014-02-07 13:58:43 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2014-02-07 13:58:43 -0500 |
commit | b6f3a40cb70fa53a5160b8f061ff219b00992626 (patch) | |
tree | 80504efb1a3d5b89143b17f668a1e40eb420793a /net/rxrpc | |
parent | 8961749e5f498d91ded20dc797bb77aa366bca2e (diff) |
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: Tim Smith <tim@electronghost.co.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc')
-rw-r--r-- | net/rxrpc/ar-input.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/rxrpc/ar-input.c b/net/rxrpc/ar-input.c index 529572f18d1f..eb7e16276cc1 100644 --- a/net/rxrpc/ar-input.c +++ b/net/rxrpc/ar-input.c | |||
@@ -606,8 +606,10 @@ dead_call: | |||
606 | } | 606 | } |
607 | 607 | ||
608 | _debug("dead call"); | 608 | _debug("dead call"); |
609 | skb->priority = RX_CALL_DEAD; | 609 | if (sp->hdr.type != RXRPC_PACKET_TYPE_ABORT) { |
610 | rxrpc_reject_packet(conn->trans->local, skb); | 610 | skb->priority = RX_CALL_DEAD; |
611 | rxrpc_reject_packet(conn->trans->local, skb); | ||
612 | } | ||
611 | goto done; | 613 | goto done; |
612 | 614 | ||
613 | /* resend last packet of a completed call | 615 | /* resend last packet of a completed call |
@@ -790,8 +792,10 @@ cant_route_call: | |||
790 | skb->priority = RX_CALL_DEAD; | 792 | skb->priority = RX_CALL_DEAD; |
791 | } | 793 | } |
792 | 794 | ||
793 | _debug("reject"); | 795 | if (sp->hdr.type != RXRPC_PACKET_TYPE_ABORT) { |
794 | rxrpc_reject_packet(local, skb); | 796 | _debug("reject type %d",sp->hdr.type); |
797 | rxrpc_reject_packet(local, skb); | ||
798 | } | ||
795 | rxrpc_put_local(local); | 799 | rxrpc_put_local(local); |
796 | _leave(" [no call]"); | 800 | _leave(" [no call]"); |
797 | return; | 801 | return; |