Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit defbbf4c authored by Xin Long's avatar Xin Long Committed by Greg Kroah-Hartman
Browse files

sctp: use the old asoc when making the cookie-ack chunk in dupcook_d



[ Upstream commit 46e16d4b956867013e0bbd7f2bad206f4aa55752 ]

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: default avatarXin Long <lucien.xin@gmail.com>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2e7d9d72
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1959,7 +1959,7 @@ static sctp_disposition_t sctp_sf_do_dupcook_d(struct net *net,
		}
		}
	}
	}


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