diff options
author | David S. Miller <davem@davemloft.net> | 2015-06-14 09:56:52 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-14 09:56:52 +0300 |
commit | 25c43bf13b1657d9a2f6a2565e9159ce31517aa5 (patch) | |
tree | c1fef736d3227dbd3788206c746d00763247f232 /net/sctp | |
parent | a2f0fad32b0d0022c7e5706d333d74a9579f3742 (diff) | |
parent | c8d17b451aa18b07b60e771addf17a5fdd4138c7 (diff) | |
download | linux-25c43bf13b1657d9a2f6a2565e9159ce31517aa5.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/auth.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/sctp/auth.c b/net/sctp/auth.c index fb7976aee61c..4f15b7d730e1 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c @@ -381,13 +381,14 @@ nomem: } -/* Public interface to creat the association shared key. +/* Public interface to create the association shared key. * See code above for the algorithm. */ int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp) { struct sctp_auth_bytes *secret; struct sctp_shared_key *ep_key; + struct sctp_chunk *chunk; /* If we don't support AUTH, or peer is not capable * we don't need to do anything. @@ -410,6 +411,14 @@ int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp) sctp_auth_key_put(asoc->asoc_shared_key); asoc->asoc_shared_key = secret; + /* Update send queue in case any chunk already in there now + * needs authenticating + */ + list_for_each_entry(chunk, &asoc->outqueue.out_chunk_list, list) { + if (sctp_auth_send_cid(chunk->chunk_hdr->type, asoc)) + chunk->auth = 1; + } + return 0; } |