Skip to content

Commit

Permalink
sctp: use the old asoc when making the cookie-ack chunk in dupcook_d
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Neil Horman <[email protected]>
Acked-by: Marcelo Ricardo Leitner <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
lxin authored and davem330 committed May 2, 2018
1 parent 4842a08 commit 46e16d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sctp/sm_statefuns.c
Original file line number Diff line number Diff line change
Expand Up @@ -2056,7 +2056,7 @@ static enum sctp_disposition sctp_sf_do_dupcook_d(
}
}

repl = sctp_make_cookie_ack(new_asoc, chunk);
repl = sctp_make_cookie_ack(asoc, chunk);
if (!repl)
goto nomem;

Expand Down

0 comments on commit 46e16d4

Please sign in to comment.