Skip to content

Commit 298bc15

Browse files
committed
rxrpc: Only take the rwind and mtu values from latest ACK
Move the out-of-order and duplicate ACK packet check to before the call to rxrpc_input_ackinfo() so that the receive window size and MTU size are only checked in the latest ACK packet and don't regress. Fixes: 248f219 ("rxrpc: Rewrite the data and ack handling code") Signed-off-by: David Howells <[email protected]>
1 parent dfe9952 commit 298bc15

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

net/rxrpc/input.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,16 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb,
868868
rxrpc_propose_ack_respond_to_ack);
869869
}
870870

871+
/* Discard any out-of-order or duplicate ACKs. */
872+
if (before_eq(sp->hdr.serial, call->acks_latest)) {
873+
_debug("discard ACK %d <= %d",
874+
sp->hdr.serial, call->acks_latest);
875+
return;
876+
}
877+
call->acks_latest_ts = skb->tstamp;
878+
call->acks_latest = sp->hdr.serial;
879+
880+
/* Parse rwind and mtu sizes if provided. */
871881
ioffset = offset + nr_acks + 3;
872882
if (skb->len >= ioffset + sizeof(buf.info)) {
873883
if (skb_copy_bits(skb, ioffset, &buf.info, sizeof(buf.info)) < 0)
@@ -889,15 +899,6 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb,
889899
return;
890900
}
891901

892-
/* Discard any out-of-order or duplicate ACKs. */
893-
if (before_eq(sp->hdr.serial, call->acks_latest)) {
894-
_debug("discard ACK %d <= %d",
895-
sp->hdr.serial, call->acks_latest);
896-
return;
897-
}
898-
call->acks_latest_ts = skb->tstamp;
899-
call->acks_latest = sp->hdr.serial;
900-
901902
if (before(hard_ack, call->tx_hard_ack) ||
902903
after(hard_ack, call->tx_top))
903904
return rxrpc_proto_abort("AKW", call, 0);

0 commit comments

Comments
 (0)