]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: fix stream update when processing dupcookie
authorXin Long <lucien.xin@gmail.com>
Tue, 23 May 2017 05:28:54 +0000 (13:28 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 May 2017 19:21:04 +0000 (15:21 -0400)
commitd64bf9231de9a5d2e5f716102d568dabc2d9c72e
treec61ede11017fffa658fb9ec7d9e57587a4e6495b
parent5b53f5e570f144944b3fb83dd0c205abee2792f1
sctp: fix stream update when processing dupcookie

Since commit 0f48f538cd97 ("sctp: alloc stream info when initializing
asoc"), stream and stream.out info are always alloced when creating
an asoc.

So it's not correct to check !asoc->stream before updating stream
info when processing dupcookie, but would be better to check asoc
state instead.

Fixes: 0f48f538cd97 ("sctp: alloc stream info when initializing asoc")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/associola.c