Message ID | 1b33cb70222974d65a7194a506c9e99d474732c2.1552910681.git.lucien.xin@gmail.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show
Return-Path: <netdev-owner@vger.kernel.org> X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CHwbpVMl"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44NFLh2Sntz9s3q for <patchwork-incoming-netdev@ozlabs.org>; Mon, 18 Mar 2019 23:07:56 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727610AbfCRMHz (ORCPT <rfc822;patchwork-incoming-netdev@ozlabs.org>); Mon, 18 Mar 2019 08:07:55 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:36749 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726435AbfCRMHz (ORCPT <rfc822;netdev@vger.kernel.org>); Mon, 18 Mar 2019 08:07:55 -0400 Received: by mail-pf1-f195.google.com with SMTP id p10so4301337pff.3; Mon, 18 Mar 2019 05:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=rZKr1nerhgxSPOwRIzCEi0iwKi5J01yuEvLb6bgA/cQ=; b=CHwbpVMlMUgJ8DnVCku9PnkadxR9AbGTzwY5bCE0bHXv6jjeAaFuR95BnfilVoJshh Aj0hW+Zz4zbV11kh7RZa2RUhJAnzzFsR2SRk5WhhEq8yzSLOLAJffcoi7hDnIPEuJwGC HiY8HdDc/NhW8Z/sahb+IderR8kYOioBY2j43yJNAvaqy1EGKRKsRIpvroQEoObr5Gu7 geWF1L0BHqZSOMWhoizVn2bfbXAmAmmQOb2bQBUksI5j9QqxndGHj/SleqG6Yjb3Assh wtWqynHS1aVyp3PCvn5GzE6WXo+lakD8SxDUjGHAL8L331KnM3iABrDEIunkyVbmtKb+ Twmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=rZKr1nerhgxSPOwRIzCEi0iwKi5J01yuEvLb6bgA/cQ=; b=Z8VNZay9wDm47CuG3uhNDlgP4F0lMv7shnUiSx1rS8lm4JokUL+Ecj9pfGthkyQnmq O4NalwjlYjq8EzQdEz45aOcAlTX7GaGomatKR6hJ/LWZyPObD6d2kVA+m/ZJQVVep4J3 9XEb71Q+tK2g6d8FvsROlxSAaD+SbrWzTapo+6BkAX+q/7Gi5Orc5MgN2V8PNeVseYwz Fcidi1Rm8SajPZV9/1ZCjjtYL2veXZN3uC99dciuRCuw5eqydc9fbADx5FgWxsks2W4a MsZmShP+qcZXAiOpkP+3SGRYv53bu7MqZfgrvaXo5mwa/1+77opRjIp3Lp5vLXHMh1F0 YkHQ== X-Gm-Message-State: APjAAAVuOC6wN2fbyn9sL8XeuGrixYCZ5gbZpDmLiR6HtxEKFo6T5lqx PvQTDERfCzV5A72MTV9+wG8repuRSBc= X-Google-Smtp-Source: APXvYqzguz3wdEyaq894gxS3TLrwGlyR/+6DVy0RFBFDOJ5VtIwozOqp/jMwXvt3m80H2JbmU3FZVA== X-Received: by 2002:a17:902:e784:: with SMTP id cp4mr19401082plb.135.1552910874161; Mon, 18 Mar 2019 05:07:54 -0700 (PDT) Received: from localhost ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id k26sm2550759pfo.111.2019.03.18.05.07.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Mar 2019 05:07:53 -0700 (PDT) From: Xin Long <lucien.xin@gmail.com> To: network dev <netdev@vger.kernel.org>, linux-sctp@vger.kernel.org Cc: davem@davemloft.net, Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>, Neil Horman <nhorman@tuxdriver.com> Subject: [PATCH net 11/13] sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_ENABLE_STREAM_RESET sockopt Date: Mon, 18 Mar 2019 20:06:09 +0800 Message-Id: <1b33cb70222974d65a7194a506c9e99d474732c2.1552910681.git.lucien.xin@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <35a7b393cc72087426f3c7bbd47c6fa7cbc838ae.1552910681.git.lucien.xin@gmail.com> References: <cover.1552910681.git.lucien.xin@gmail.com> <a866141aba7511710929fffd71b0b911ddda28f4.1552910681.git.lucien.xin@gmail.com> <b7541db7198a1df5d75100bd9cb19678613c0a10.1552910681.git.lucien.xin@gmail.com> <47d570738f0cc850e9183731e47d15a7647764a0.1552910681.git.lucien.xin@gmail.com> <3d889968ad901918974cc09c78064bd4a5a24ff7.1552910681.git.lucien.xin@gmail.com> <446bf443557ec1433a5f85c9a1e15987df20a8df.1552910681.git.lucien.xin@gmail.com> <9028a9b0f9968d629614a36cbbf79fef34935717.1552910681.git.lucien.xin@gmail.com> <ead4f7e6f620d64b9616b8e394e559c55427229e.1552910681.git.lucien.xin@gmail.com> <0c9808b498eb088a9146a09c79d795e30e3c79c5.1552910681.git.lucien.xin@gmail.com> <fa16260b4714687bba2cfbf2703347c9d0d9f6c2.1552910681.git.lucien.xin@gmail.com> <35a7b393cc72087426f3c7bbd47c6fa7cbc838ae.1552910681.git.lucien.xin@gmail.com> In-Reply-To: <cover.1552910681.git.lucien.xin@gmail.com> References: <cover.1552910681.git.lucien.xin@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: <netdev.vger.kernel.org> X-Mailing-List: netdev@vger.kernel.org |
Series |
sctp: fix ignoring asoc_id for tcp-style sockets on some setsockopts
|
expand
|
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 238e5c8..6b0ee89 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4281,6 +4281,9 @@ static int sctp_setsockopt_enable_strreset(struct sock *sk, goto out; } + if (sctp_style(sk, TCP)) + params.assoc_id = SCTP_FUTURE_ASSOC; + if (params.assoc_id == SCTP_FUTURE_ASSOC || params.assoc_id == SCTP_ALL_ASSOC) ep->strreset_enable = params.assoc_value;
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_ENABLE_STREAM_RESET sockopt. Fixes: 99a62135e127 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_ENABLE_STREAM_RESET sockopt") Signed-off-by: Xin Long <lucien.xin@gmail.com> --- net/sctp/socket.c | 3 +++ 1 file changed, 3 insertions(+)