summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/security.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-04-04 09:00:36 -0400
committerDavid Howells <dhowells@redhat.com>2016-06-22 04:09:59 -0400
commit19ffa01c9c45861ad6b181323e0d36904298e326 (patch)
treeb81cd9ec90ca2c51829ffe9f765fd7a6b26e5e7b /net/rxrpc/security.c
parent2f9f9f5210887b1019fbd0327ffdf7c3aff271fd (diff)
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>
Diffstat (limited to 'net/rxrpc/security.c')
-rw-r--r--net/rxrpc/security.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/rxrpc/security.c b/net/rxrpc/security.c
index d223253b22fa..40955d0f2693 100644
--- a/net/rxrpc/security.c
+++ b/net/rxrpc/security.c
@@ -76,7 +76,7 @@ int rxrpc_init_client_conn_security(struct rxrpc_connection *conn)
76{ 76{
77 const struct rxrpc_security *sec; 77 const struct rxrpc_security *sec;
78 struct rxrpc_key_token *token; 78 struct rxrpc_key_token *token;
79 struct key *key = conn->key; 79 struct key *key = conn->params.key;
80 int ret; 80 int ret;
81 81
82 _enter("{%d},{%x}", conn->debug_id, key_serial(key)); 82 _enter("{%d},{%x}", conn->debug_id, key_serial(key));
@@ -121,7 +121,7 @@ int rxrpc_init_server_conn_security(struct rxrpc_connection *conn)
121 121
122 _enter(""); 122 _enter("");
123 123
124 sprintf(kdesc, "%u:%u", conn->service_id, conn->security_ix); 124 sprintf(kdesc, "%u:%u", conn->params.service_id, conn->security_ix);
125 125
126 sec = rxrpc_security_lookup(conn->security_ix); 126 sec = rxrpc_security_lookup(conn->security_ix);
127 if (!sec) { 127 if (!sec) {
@@ -132,7 +132,7 @@ int rxrpc_init_server_conn_security(struct rxrpc_connection *conn)
132 /* find the service */ 132 /* find the service */
133 read_lock_bh(&local->services_lock); 133 read_lock_bh(&local->services_lock);
134 list_for_each_entry(rx, &local->services, listen_link) { 134 list_for_each_entry(rx, &local->services, listen_link) {
135 if (rx->srx.srx_service == conn->service_id) 135 if (rx->srx.srx_service == conn->params.service_id)
136 goto found_service; 136 goto found_service;
137 } 137 }
138 138