diff options
author | Xin Long <lucien.xin@gmail.com> | 2017-03-29 20:00:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-30 21:08:47 +0300 |
commit | 3dbcc105d5561e18ccd0842c7baab1c835562a37 (patch) | |
tree | a4612311dc9f7acaeb1a7130c56f4e63323305f8 /include | |
parent | bcc5364bdcfe131e6379363f089e7b4108d35b70 (diff) | |
download | linux-3dbcc105d5561e18ccd0842c7baab1c835562a37.tar.xz |
sctp: alloc stream info when initializing asoc
When sending a msg without asoc established, sctp will send INIT packet
first and then enqueue chunks.
Before receiving INIT_ACK, stream info is not yet alloced. But enqueuing
chunks needs to access stream info, like out stream state and out stream
cnt.
This patch is to fix it by allocing out stream info when initializing an
asoc, allocing in stream and re-allocing out stream when processing init.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/sctp/structs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 8caa5ee9e290..a127b7c2c3c9 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -377,7 +377,8 @@ typedef struct sctp_sender_hb_info { __u64 hb_nonce; } sctp_sender_hb_info_t; -struct sctp_stream *sctp_stream_new(__u16 incnt, __u16 outcnt, gfp_t gfp); +int sctp_stream_new(struct sctp_association *asoc, gfp_t gfp); +int sctp_stream_init(struct sctp_association *asoc, gfp_t gfp); void sctp_stream_free(struct sctp_stream *stream); void sctp_stream_clear(struct sctp_stream *stream); |