]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: use the old asoc when making the cookie-ack chunk in dupcook_d
authorXin Long <lucien.xin@gmail.com>
Wed, 2 May 2018 05:39:46 +0000 (13:39 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 May 2018 15:15:33 +0000 (11:15 -0400)
commitf96674e83825d4a8e083b8119932d6642e027fbb
tree8e48a858378c7ac595d5a75664369b616aa34d0d
parentf860af5dcbd5bc95433b01f3a1878568d0bb4dad
sctp: use the old asoc when making the cookie-ack chunk in dupcook_d

When processing a duplicate cookie-echo chunk, for case 'D', sctp will
not process the param from this chunk. It means old asoc has nothing
to be updated, and the new temp asoc doesn't have the complete info.

So there's no reason to use the new asoc when creating the cookie-ack
chunk. Otherwise, like when auth is enabled for cookie-ack, the chunk
can not be set with auth, and it will definitely be dropped by peer.

This issue is there since very beginning, and we fix it by using the
old asoc instead.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/sm_statefuns.c