aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc/ar-connevent.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-04-07 17:23:58 +0100
committerDavid S. Miller <davem@davemloft.net>2016-04-11 15:34:41 -0400
commite0e4d82f3be60cfe8b10304c6daf3ca5973ae9e3 (patch)
tree717c4bd8d4a001016917688b38ce767ecf79ce39 /net/rxrpc/ar-connevent.c
parentrxrpc: Absorb the rxkad security module (diff)
downloadlinux-dev-e0e4d82f3be60cfe8b10304c6daf3ca5973ae9e3.tar.xz
linux-dev-e0e4d82f3be60cfe8b10304c6daf3ca5973ae9e3.zip
rxrpc: Create a null security type and get rid of conditional calls
Create a null security type for security index 0 and get rid of all conditional calls to the security operations. We expect normally to be using security, so this should be of little negative impact. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rxrpc/ar-connevent.c')
-rw-r--r--net/rxrpc/ar-connevent.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/net/rxrpc/ar-connevent.c b/net/rxrpc/ar-connevent.c
index 291522392ac7..5f9563968a5b 100644
--- a/net/rxrpc/ar-connevent.c
+++ b/net/rxrpc/ar-connevent.c
@@ -174,15 +174,10 @@ static int rxrpc_process_event(struct rxrpc_connection *conn,
return -ECONNABORTED;
case RXRPC_PACKET_TYPE_CHALLENGE:
- if (conn->security)
- return conn->security->respond_to_challenge(
- conn, skb, _abort_code);
- return -EPROTO;
+ return conn->security->respond_to_challenge(conn, skb,
+ _abort_code);
case RXRPC_PACKET_TYPE_RESPONSE:
- if (!conn->security)
- return -EPROTO;
-
ret = conn->security->verify_response(conn, skb, _abort_code);
if (ret < 0)
return ret;
@@ -238,8 +233,6 @@ static void rxrpc_secure_connection(struct rxrpc_connection *conn)
}
}
- ASSERT(conn->security != NULL);
-
if (conn->security->issue_challenge(conn) < 0) {
abort_code = RX_CALL_DEAD;
ret = -ENOMEM;