Commit 2266ffde authored by David Howells's avatar David Howells

rxrpc: Fix conn-based retransmit

If a duplicate packet comes in for a call that has just completed on a
connection's channel then there will be an oops in the data_ready handler
because it tries to examine the connection struct via a call struct (which
we don't have - the pointer is unset).

Since the connection struct pointer is available to us, go direct instead.

Also, the ACK packet to be retransmitted needs three octets of padding
between the soft ack list and the ackinfo.

Fixes: 18bfeba5 ("rxrpc: Perform terminal call ACK/ABORT retransmission from conn processor")
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 5d77dca8
...@@ -42,6 +42,7 @@ static void rxrpc_conn_retransmit(struct rxrpc_connection *conn, ...@@ -42,6 +42,7 @@ static void rxrpc_conn_retransmit(struct rxrpc_connection *conn,
} abort; } abort;
struct { struct {
struct rxrpc_ackpacket ack; struct rxrpc_ackpacket ack;
u8 padding[3];
struct rxrpc_ackinfo info; struct rxrpc_ackinfo info;
}; };
}; };
......
...@@ -732,7 +732,7 @@ void rxrpc_data_ready(struct sock *sk) ...@@ -732,7 +732,7 @@ void rxrpc_data_ready(struct sock *sk)
/* For the previous service call, if completed /* For the previous service call, if completed
* successfully, we discard all further packets. * successfully, we discard all further packets.
*/ */
if (rxrpc_conn_is_service(call->conn) && if (rxrpc_conn_is_service(conn) &&
(chan->last_type == RXRPC_PACKET_TYPE_ACK || (chan->last_type == RXRPC_PACKET_TYPE_ACK ||
sp->hdr.type == RXRPC_PACKET_TYPE_ABORT)) sp->hdr.type == RXRPC_PACKET_TYPE_ABORT))
goto discard_unlock; goto discard_unlock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment