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

Commit a2eeacc8 authored by Xin Long's avatar Xin Long Committed by David S. Miller
Browse files

sctp: check asoc peer.asconf_capable before processing asconf



asconf chunks should be dropped when the asoc doesn't support
asconf feature.

Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bb2ded26
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3721,7 +3721,8 @@ enum sctp_disposition sctp_sf_do_asconf(struct net *net,
	 * is received unauthenticated it MUST be silently discarded as
	 * described in [I-D.ietf-tsvwg-sctp-auth].
	 */
	if (!net->sctp.addip_noauth && !chunk->auth)
	if (!asoc->peer.asconf_capable ||
	    (!net->sctp.addip_noauth && !chunk->auth))
		return sctp_sf_discard_chunk(net, ep, asoc, type, arg,
					     commands);

@@ -3863,7 +3864,8 @@ enum sctp_disposition sctp_sf_do_asconf_ack(struct net *net,
	 * is received unauthenticated it MUST be silently discarded as
	 * described in [I-D.ietf-tsvwg-sctp-auth].
	 */
	if (!net->sctp.addip_noauth && !asconf_ack->auth)
	if (!asoc->peer.asconf_capable ||
	    (!net->sctp.addip_noauth && !asconf_ack->auth))
		return sctp_sf_discard_chunk(net, ep, asoc, type, arg,
					     commands);