Lines Matching defs:auth
67 packet->auth = NULL;
240 /* Try to bundle an auth chunk into the packet. */
246 struct sctp_chunk *auth;
252 /* See if this is an auth chunk we are bundling or if
253 * auth is already bundled.
261 if (!chunk->auth)
264 auth = sctp_make_auth(asoc, chunk->shkey->key_id);
265 if (!auth)
268 auth->shkey = chunk->shkey;
269 sctp_auth_shkey_hold(auth->shkey);
271 retval = __sctp_packet_append_chunk(pkt, auth);
274 sctp_chunk_free(auth);
368 packet->auth = chunk;
440 struct sctp_auth_chunk *auth = NULL;
463 if (chunk == packet->auth)
496 if (chunk == packet->auth)
497 auth = (struct sctp_auth_chunk *)
512 if (!sctp_chunk_is_data(chunk) && chunk != packet->auth)
519 if (auth) {
520 sctp_auth_calculate_hmac(tp->asoc, nskb, auth,
521 packet->auth->shkey, gfp);
522 /* free auth if no more chunks, or add it back */
524 sctp_chunk_free(packet->auth);
526 list_add(&packet->auth->list,
788 /* Don't bundle in this packet if this chunk's auth key doesn't
790 * don't bundle the chunk with auth key if other chunks in this
791 * packet don't have auth key.
793 if ((packet->auth && chunk->shkey != packet->auth->shkey) ||
794 (!packet->auth && chunk->shkey &&
814 (!packet->has_data && chunk->auth)) {
829 if (packet->auth)
830 maxsize -= SCTP_PAD4(packet->auth->skb->len);