rxrpc: Use structs to hold connection params and protocol info
Define and use a structure to hold connection parameters. This makes it easier to pass multiple connection parameters around. Define and use a structure to hold protocol information used to hash a connection for lookup on incoming packet. Most of these fields will be disposed of eventually, including the duplicate local pointer. Whilst we're at it rename "proto" to "family" when referring to a protocol family. Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
@@ -76,7 +76,7 @@ int rxrpc_init_client_conn_security(struct rxrpc_connection *conn)
|
||||
{
|
||||
const struct rxrpc_security *sec;
|
||||
struct rxrpc_key_token *token;
|
||||
struct key *key = conn->key;
|
||||
struct key *key = conn->params.key;
|
||||
int ret;
|
||||
|
||||
_enter("{%d},{%x}", conn->debug_id, key_serial(key));
|
||||
@@ -121,7 +121,7 @@ int rxrpc_init_server_conn_security(struct rxrpc_connection *conn)
|
||||
|
||||
_enter("");
|
||||
|
||||
sprintf(kdesc, "%u:%u", conn->service_id, conn->security_ix);
|
||||
sprintf(kdesc, "%u:%u", conn->params.service_id, conn->security_ix);
|
||||
|
||||
sec = rxrpc_security_lookup(conn->security_ix);
|
||||
if (!sec) {
|
||||
@@ -132,7 +132,7 @@ int rxrpc_init_server_conn_security(struct rxrpc_connection *conn)
|
||||
/* find the service */
|
||||
read_lock_bh(&local->services_lock);
|
||||
list_for_each_entry(rx, &local->services, listen_link) {
|
||||
if (rx->srx.srx_service == conn->service_id)
|
||||
if (rx->srx.srx_service == conn->params.service_id)
|
||||
goto found_service;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user