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

Signed-off-by: Xin Long <lucien....@gmail.com>
---
 net/sctp/sm_statefuns.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 2c244b2..0c21c52 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -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);
 
-- 
2.1.0

Reply via email to