]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
rxrpc: Fix accidental cancellation of scheduled resend by ACK parser
authorDavid Howells <dhowells@redhat.com>
Fri, 23 Sep 2016 11:39:23 +0000 (12:39 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 23 Sep 2016 14:35:45 +0000 (15:35 +0100)
When rxrpc_input_soft_acks() is parsing the soft-ACKs from an ACK packet,
it updates the Tx packet annotations in the annotation buffer.  If a
soft-ACK is an ACK, then we overwrite unack'd, nak'd or to-be-retransmitted
states and that is fine; but if the soft-ACK is an NACK, we overwrite the
to-be-retransmitted with a nak - which isn't.

Instead, we need to let any scheduled retransmission stand if the packet
was NAK'd.

Note that we don't reissue a resend if the annotation is in the
to-be-retransmitted state because someone else must've scheduled the
resend already.

Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/input.c

index 06027b6d9c19dbb0dc92c4ca8044092ce46b2964..d3d69ab1f0a1936498ee0a66075f0382523c79f8 100644 (file)
@@ -479,6 +479,8 @@ static void rxrpc_input_soft_acks(struct rxrpc_call *call, u8 *acks,
                case RXRPC_ACK_TYPE_NACK:
                        if (anno_type == RXRPC_TX_ANNO_NAK)
                                continue;
+                       if (anno_type == RXRPC_TX_ANNO_RETRANS)
+                               continue;
                        call->rxtx_annotations[ix] =
                                RXRPC_TX_ANNO_NAK | annotation;
                        resend = true;