]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sctp: alloc stream info when initializing asoc
authorXin Long <lucien.xin@gmail.com>
Wed, 29 Mar 2017 17:00:53 +0000 (01:00 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Mar 2017 18:08:47 +0000 (11:08 -0700)
commit3dbcc105d5561e18ccd0842c7baab1c835562a37
treea4612311dc9f7acaeb1a7130c56f4e63323305f8
parentbcc5364bdcfe131e6379363f089e7b4108d35b70
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>
include/net/sctp/structs.h
net/sctp/associola.c
net/sctp/sm_make_chunk.c
net/sctp/stream.c