atomic_t skb_count; /* Outstanding packets on this call */
atomic_t sequence; /* Tx data packet sequence counter */
u16 service_id; /* service ID */
+ u8 security_ix; /* Security type */
u32 call_id; /* call ID on connection */
u32 cid; /* connection ID plus channel index */
int debug_id; /* debug ID for printks */
candidate->peer = conn->params.peer;
candidate->cid = sp->hdr.cid;
candidate->call_id = sp->hdr.callNumber;
+ candidate->security_ix = sp->hdr.securityIndex;
candidate->rx_data_post = 0;
candidate->state = RXRPC_CALL_SERVER_ACCEPTING;
candidate->flags |= (1 << RXRPC_CALL_IS_SERVICE);
if (cp->exclusive) {
call->conn = candidate;
+ call->security_ix = candidate->security_ix;
_leave(" = 0 [exclusive %d]", candidate->debug_id);
return 0;
}
candidate_published:
set_bit(RXRPC_CONN_IN_CLIENT_CONNS, &candidate->flags);
call->conn = candidate;
+ call->security_ix = candidate->security_ix;
spin_unlock(&local->client_conns_lock);
_leave(" = 0 [new %d]", candidate->debug_id);
return 0;
spin_lock(&conn->channel_lock);
call->conn = conn;
+ call->security_ix = conn->security_ix;
list_add(&call->chan_wait_link, &conn->waiting_calls);
spin_unlock(&conn->channel_lock);
_leave(" = 0 [extant %d]", conn->debug_id);
/* if the packet need security things doing to it, then it goes down
* the slow path */
- if (call->conn->security_ix)
+ if (call->security_ix)
goto enqueue_packet;
sp->call = call;
sp->hdr.serial = atomic_inc_return(&conn->serial);
sp->hdr.type = RXRPC_PACKET_TYPE_DATA;
sp->hdr.userStatus = 0;
- sp->hdr.securityIndex = conn->security_ix;
+ sp->hdr.securityIndex = call->security_ix;
sp->hdr._rsvd = 0;
sp->hdr.serviceId = call->service_id;