diff options
author | David Howells <dhowells@redhat.com> | 2022-10-20 10:56:36 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2023-01-06 10:43:32 +0100 |
commit | a00ce28b1778fa3576575b43bdb17f60ded38b66 (patch) | |
tree | 213ef805ccc7f28552e236d9ac6c364dc69e3184 /net/rxrpc/insecure.c | |
parent | rxrpc: Implement a mechanism to send an event notification to a connection (diff) | |
download | linux-a00ce28b1778fa3576575b43bdb17f60ded38b66.tar.xz linux-a00ce28b1778fa3576575b43bdb17f60ded38b66.zip |
rxrpc: Clean up connection abort
Clean up connection abort, using the connection state_lock to gate access
to change that state, and use an rxrpc_call_completion value to indicate
the difference between local and remote aborts as these can be pasted
directly into the call state.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Diffstat (limited to 'net/rxrpc/insecure.c')
-rw-r--r-- | net/rxrpc/insecure.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/net/rxrpc/insecure.c b/net/rxrpc/insecure.c index 0eb8471bfc53..29dcc7d3f51a 100644 --- a/net/rxrpc/insecure.c +++ b/net/rxrpc/insecure.c @@ -43,25 +43,15 @@ static void none_free_call_crypto(struct rxrpc_call *call) } static int none_respond_to_challenge(struct rxrpc_connection *conn, - struct sk_buff *skb, - u32 *_abort_code) + struct sk_buff *skb) { - struct rxrpc_skb_priv *sp = rxrpc_skb(skb); - - trace_rxrpc_rx_eproto(NULL, sp->hdr.serial, - tracepoint_string("chall_none")); - return -EPROTO; + return rxrpc_abort_conn(conn, skb, RX_PROTOCOL_ERROR, -EPROTO, "RXN"); } static int none_verify_response(struct rxrpc_connection *conn, - struct sk_buff *skb, - u32 *_abort_code) + struct sk_buff *skb) { - struct rxrpc_skb_priv *sp = rxrpc_skb(skb); - - trace_rxrpc_rx_eproto(NULL, sp->hdr.serial, - tracepoint_string("resp_none")); - return -EPROTO; + return rxrpc_abort_conn(conn, skb, RX_PROTOCOL_ERROR, -EPROTO, "RXN"); } static void none_clear(struct rxrpc_connection *conn) |