Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1642168pxy; Mon, 2 Aug 2021 06:55:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX6T1yNP7TxOoxyANIvGziZxF7SEXw2odwMciOdn6wnPATfqqkqgy4trJnf3RdsePECCIw X-Received: by 2002:a05:6638:35aa:: with SMTP id v42mr14962462jal.21.1627912553983; Mon, 02 Aug 2021 06:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912553; cv=none; d=google.com; s=arc-20160816; b=Ohwm7L9XjX7uHYbBi84EAc+NB3Jx5AwjaWREbxFci8avrYY9JcDOs0FgX+8/r9Fh7O 07Lp4ASn805sascUvjJeQCV9FudzRXR+wn8sQuGcWhY4cXgpV5Wp2r06dpVEWPegCC4k bqXfpGAIw0LrjLpLTTqptoZKif3wNH8R0EzOFjmDL8y1tlXG40c/LhUPQEudcwZ6EIsf NshpNRSKeRyptVanvqVi/mKmLiKQhOgAeCOsFxE/3esiduAvnrH5BI73W6A/V9yb2dJj yZwiOikAkddCX+F0WfOYQjMCuB9JKseZpcvN8rmOJ/qIFzQWd3Rys61/4OKS/FChCmh3 Xbpw== 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=KXf80WrGOq6zLbpOLtN6E1Tx8mMKVJYpfmtvd+PQbR4=; b=MUHeUqdz1u6fbbCdQTgL8rIfAhRK+g4lGGEzFD6RSKXe+ZYrohkKtVXgFmBSjndNLJ Y9C/sKJfUGJ+esnk3ZxiL5tom9Zr6LMyRonOTZ4O+Dz+JOvpv2JgjRF8kHUU69652vmA TsVWia0qMpQK0rtDjkTQO0oEjgl+e1BolnWLxaZMYd9mAovkyXM5Oizo/eDWYjgQz3cJ otu4pyaYyDYGKguthn4/anBWE4lfUXHYYn59kdjDdf7uyPjukVRHpu9gEZ35dv222reR X9h3N+m7r3ZFiHgbz2zf51BX055SjiWIkhfu3cXaYbDcUlVC2uW81FwD2OsHlH9wRpxD RkSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LpxlUDrg; 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 s8si12134069ilu.146.2021.08.02.06.55.42; Mon, 02 Aug 2021 06:55:53 -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=LpxlUDrg; 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 S235189AbhHBNx1 (ORCPT + 99 others); Mon, 2 Aug 2021 09:53:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:58758 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234789AbhHBNtR (ORCPT ); Mon, 2 Aug 2021 09:49:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 75F1B60EBB; Mon, 2 Aug 2021 13:49:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912147; bh=XwBRdNzQ8bhr3FxMYdiLgpab1x5S1ZUiuwwhtvHt4Ks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LpxlUDrgxdl7D/qtEkxRGJqkc6C5XWjw2CI4/EiVt9yiONh6kNdq/r0rsCn2uZ3le uoopBk3vN/HHeLa7QsmP8txa8MYDGQCpdr/X4KM7MyNtCIFu9ATUpaLlq7wLveFAxg wSnfuwTYQnWAdLGsAAscxOnAxMJ5puEPlrLBzNuY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?S=C3=A9rgio?= , Xin Long , Marcelo Ricardo Leitner , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 09/38] sctp: move 198 addresses from unusable to private scope Date: Mon, 2 Aug 2021 15:44:31 +0200 Message-Id: <20210802134335.132297405@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134334.835358048@linuxfoundation.org> References: <20210802134334.835358048@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: Xin Long [ Upstream commit 1d11fa231cabeae09a95cb3e4cf1d9dd34e00f08 ] The doc draft-stewart-tsvwg-sctp-ipv4-00 that restricts 198 addresses was never published. These addresses as private addresses should be allowed to use in SCTP. As Michael Tuexen suggested, this patch is to move 198 addresses from unusable to private scope. Reported-by: Sérgio Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- include/net/sctp/constants.h | 4 +--- net/sctp/protocol.c | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index d4da07048aa3..cbf96458ce22 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h @@ -348,8 +348,7 @@ enum { #define SCTP_SCOPE_POLICY_MAX SCTP_SCOPE_POLICY_LINK /* Based on IPv4 scoping , - * SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 198.18.0.0/24, - * 192.88.99.0/24. + * SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 192.88.99.0/24. * Also, RFC 8.4, non-unicast addresses are not considered valid SCTP * addresses. */ @@ -357,7 +356,6 @@ enum { ((htonl(INADDR_BROADCAST) == a) || \ ipv4_is_multicast(a) || \ ipv4_is_zeronet(a) || \ - ipv4_is_test_198(a) || \ ipv4_is_anycast_6to4(a)) /* Flags used for the bind address copy functions. */ diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index d5cf05efddfd..868b97607601 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -423,7 +423,8 @@ static enum sctp_scope sctp_v4_scope(union sctp_addr *addr) retval = SCTP_SCOPE_LINK; } else if (ipv4_is_private_10(addr->v4.sin_addr.s_addr) || ipv4_is_private_172(addr->v4.sin_addr.s_addr) || - ipv4_is_private_192(addr->v4.sin_addr.s_addr)) { + ipv4_is_private_192(addr->v4.sin_addr.s_addr) || + ipv4_is_test_198(addr->v4.sin_addr.s_addr)) { retval = SCTP_SCOPE_PRIVATE; } else { retval = SCTP_SCOPE_GLOBAL; -- 2.30.2