Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3801005pxb; Mon, 4 Oct 2021 09:53:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJys+aXXOv5tTm/VUM84MQ/ApCzy5cFs541yXFolZkbzhqt1B/rDY52n+J+Chp8fqdChiyCu X-Received: by 2002:a63:4f54:: with SMTP id p20mr11335877pgl.437.1633366394178; Mon, 04 Oct 2021 09:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633366394; cv=none; d=google.com; s=arc-20160816; b=u4JKKnGMLU4TW6Uikc6qLBIWwNswvwJP9k64iYh6/2IFCbRsWcf++5G1GuJUX/hgqz g5Uldd1hgIrI9m1rxL8zC6iWoZOJ8I3c5prZHSmd2YNyzQK6W6x0rTOG4uXJaO7Vpw6S bomS6sbawBN8vHcajs6i+Qjf1kClnsG40gfHjsVL++TPvbHFc9ihpB2G38uzmuqRA23T Qi/01jXm60GH8jeuSMh89hivlxUim+kFTLO10Y3HChg3Si7WTyJE5xvntfPf0yMrrhm6 Dypv7V/Barm2ZVsjcGoAdM6/yFkwQnOb8uGxfq/OjDVjv9XmR+xdhQEnzUSvQj5xUJZ+ 0VjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fFOxi2BU9zRsdCzsj6ObntTHcQqMww52IrxkHrvnl18=; b=WnX5OP6X6uEtRnxeXogHLPPyWA1GDMabWgqUa/J573IiIOd/HUw7b1shePOvMXqALH yZdJPjp3yyy1XwdlCs2lWQcHRUMXFYFmEpQxjrDr/e/igThNuU+GXy9M5HMS0V/eoLEu UCrfPfvtllAchYC6moBrNSPE47cCNKN61TkMDT0OgJ1oFdpIhUURvbS61B2y/5m6q5Dd LYi1ry4TKmd2u0ONvjAc8rqJZzrDtFYO0ZYcXfgFMdo2v2h8aC/+1/daQD7MnOB8t3I1 vf84DuHhXD172GO9bN4XDGeTlm/4lA2YgwYByCH/k7hulN/U+PtoL0MiJxYedXOZVkOY 3qrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lWJUx4r5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 41si16472199pjz.14.2021.10.04.09.52.57; Mon, 04 Oct 2021 09:53:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lWJUx4r5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238337AbhJDNkS (ORCPT + 99 others); Mon, 4 Oct 2021 09:40:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:51590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238389AbhJDNi2 (ORCPT ); Mon, 4 Oct 2021 09:38:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1A8766323F; Mon, 4 Oct 2021 13:17:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633353443; bh=xxIpexGoEtjP6+UcUtuoU6QLYuAqZh52pa7yGVSSpWs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lWJUx4r5qusfhSDZwKy5CV3dQ1gFuVr3znluOE1KmEgfBb3qLsNNeBzeamXfIyBpu Ol7DYWFdXDdqu2EK6W6dLBFjtrocAAQNw/vKG8k8gN58mYiCieKLhTRw29YN5IHfu8 NJ7yXWutGX2dd9mYdn3bhjZsZuOpFrmLPZMEQ5Ls= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Davide Caratti , Mat Martineau , "David S. Miller" , Sasha Levin Subject: [PATCH 5.14 097/172] mptcp: allow changing the backup bit when no sockets are open Date: Mon, 4 Oct 2021 14:52:27 +0200 Message-Id: <20211004125048.119815720@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004125044.945314266@linuxfoundation.org> References: <20211004125044.945314266@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Davide Caratti [ Upstream commit 3f4a08909e2c740f8045efc74c4cf82eeaae3e36 ] current Linux refuses to change the 'backup' bit of MPTCP endpoints, i.e. using MPTCP_PM_CMD_SET_FLAGS, unless it finds (at least) one subflow that matches the endpoint address. There is no reason for that, so we can just ignore the return value of mptcp_nl_addr_backup(). In this way, endpoints can reconfigure their 'backup' flag even if no MPTCP sockets are open (or more generally, in case the MP_PRIO message is not sent out). Fixes: 0f9f696a502e ("mptcp: add set_flags command in PM netlink") Signed-off-by: Davide Caratti Signed-off-by: Mat Martineau Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/mptcp/pm_netlink.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index 89251cbe9f1a..81103b29c0af 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -1558,9 +1558,7 @@ static int mptcp_nl_cmd_set_flags(struct sk_buff *skb, struct genl_info *info) list_for_each_entry(entry, &pernet->local_addr_list, list) { if (addresses_equal(&entry->addr, &addr.addr, true)) { - ret = mptcp_nl_addr_backup(net, &entry->addr, bkup); - if (ret) - return ret; + mptcp_nl_addr_backup(net, &entry->addr, bkup); if (bkup) entry->flags |= MPTCP_PM_ADDR_FLAG_BACKUP; -- 2.33.0