diff options
| author | David Howells <dhowells@redhat.com> | 2025-04-11 10:52:57 +0100 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-04-14 17:36:42 -0700 |
| commit | d98c317fd9aa78dfa45e47deb6536cd35783afd1 (patch) | |
| tree | 0503e2913c1082d5fc50cfdd903a868cb323c796 /fs/afs/rxrpc.c | |
| parent | d03539d5c2dec9b028297c15e57bd3c01d0d9c0d (diff) | |
afs: Use rxgk RESPONSE to pass token for callback channel
Implement in kafs the hook for adding appdata into a RESPONSE packet
generated in response to an RxGK CHALLENGE packet, and include the key for
securing the callback channel so that notifications from the fileserver get
encrypted.
This will be necessary when more complex notifications are used that convey
changed data around.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
Link: https://patch.msgid.link/20250411095303.2316168-13-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'fs/afs/rxrpc.c')
| -rw-r--r-- | fs/afs/rxrpc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index 00b3bc087f61..c1cadf8fb346 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c @@ -78,6 +78,10 @@ int afs_open_socket(struct afs_net *net) if (ret < 0) goto error_2; + ret = afs_create_token_key(net, socket); + if (ret < 0) + pr_err("Couldn't create RxGK CM key: %d\n", ret); + ret = kernel_bind(socket, (struct sockaddr *) &srx, sizeof(srx)); if (ret == -EADDRINUSE) { srx.transport.sin6.sin6_port = 0; @@ -140,6 +144,7 @@ void afs_close_socket(struct afs_net *net) flush_workqueue(afs_async_calls); net->socket->sk->sk_user_data = NULL; sock_release(net->socket); + key_put(net->fs_cm_token_key); _debug("dework"); _leave(""); @@ -820,7 +825,7 @@ static int afs_deliver_cm_op_id(struct afs_call *call) trace_afs_cb_call(call); call->work.func = call->type->work; - /* pass responsibility for the remainer of this message off to the + /* pass responsibility for the remainder of this message off to the * cache manager op */ return call->type->deliver(call); } |
