]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: add refcnt support for sh_key
authorXin Long <lucien.xin@gmail.com>
Wed, 14 Mar 2018 11:05:30 +0000 (19:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Mar 2018 17:48:27 +0000 (13:48 -0400)
commitd57383306236da8c67ff6c5ad5e9ac45dadc3583
tree4d113bf0c79a697420a1463d6fe1798ad6f4e0d9
parent9efe70c805ef6b682255a9abccbeb4ef5f3a678f
sctp: add refcnt support for sh_key

With refcnt support for sh_key, chunks auth sh_keys can be decided
before enqueuing it. Changing the active key later will not affect
the chunks already enqueued.

Furthermore, this is necessary when adding the support for authinfo
for sendmsg in next patch.

Note that struct sctp_chunk can't be grown due to that performance
drop issue on slow cpu, so it just reuses head_skb memory for shkey
in sctp_chunk.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/auth.h
include/net/sctp/sm.h
include/net/sctp/structs.h
net/sctp/auth.c
net/sctp/chunk.c
net/sctp/output.c
net/sctp/sm_make_chunk.c
net/sctp/sm_statefuns.c
net/sctp/socket.c