aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc/ar-output.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-04-07 12:23:58 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-11 15:34:41 -0400
commite0e4d82f3be60cfe8b10304c6daf3ca5973ae9e3 (patch)
tree717c4bd8d4a001016917688b38ce767ecf79ce39 /net/rxrpc/ar-output.c
parent648af7fca15901740c7aaafd55904ebd54d01860 (diff)
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-output.c')
-rw-r--r--net/rxrpc/ar-output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rxrpc/ar-output.c b/net/rxrpc/ar-output.c
index 94e7d9537437..51cb10062a8d 100644
--- a/net/rxrpc/ar-output.c
+++ b/net/rxrpc/ar-output.c
@@ -663,7 +663,7 @@ static int rxrpc_send_data(struct rxrpc_sock *rx,
663 size_t pad; 663 size_t pad;
664 664
665 /* pad out if we're using security */ 665 /* pad out if we're using security */
666 if (conn->security) { 666 if (conn->security_ix) {
667 pad = conn->security_size + skb->mark; 667 pad = conn->security_size + skb->mark;
668 pad = conn->size_align - pad; 668 pad = conn->size_align - pad;
669 pad &= conn->size_align - 1; 669 pad &= conn->size_align - 1;
@@ -695,7 +695,7 @@ static int rxrpc_send_data(struct rxrpc_sock *rx,
695 if (more && seq & 1) 695 if (more && seq & 1)
696 sp->hdr.flags |= RXRPC_REQUEST_ACK; 696 sp->hdr.flags |= RXRPC_REQUEST_ACK;
697 697
698 ret = rxrpc_secure_packet( 698 ret = conn->security->secure_packet(
699 call, skb, skb->mark, 699 call, skb, skb->mark,
700 skb->head + sizeof(struct rxrpc_wire_header)); 700 skb->head + sizeof(struct rxrpc_wire_header));
701 if (ret < 0) 701 if (ret < 0)