Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1639519pxy; Mon, 2 Aug 2021 06:51:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFZ4m+ZAh8UhOSQBCBRjGbb5xkZyTYTs5G5yRGssDLtJFSkLl/UOXiD6vBihMjdz8QqaJ+ X-Received: by 2002:a05:6638:1036:: with SMTP id n22mr11342961jan.81.1627912303455; Mon, 02 Aug 2021 06:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912303; cv=none; d=google.com; s=arc-20160816; b=LQwNlS7cBxnIM0z3uJ905xp6g4eoimKixUvELq4sk09YOpeTG50/GVY8FeXibXTk79 Q6vqbszPqGLLLaRqc3PomLwaFcWv4z59pANzgRMREWDmHQOdhz/rJgK/PV/figpJhHZI lS+hkWmCdI0GC3+ZuIkhxt5SKVYm2MbZ1zKLlZ4dlGnU9Mf4EguZ/4yCogr7ZnPb8Qy5 04YBu88k11gVaTw2DVIEexAGxwLo2joePL8brMNGZ4yZ4wisoo6msjaJXo+aU3vkiDtk kSuvxzyAVVKiXxGjEEWGx08CHxh7UTa4eyh4CNPjCNeqZtzHyPRMuBTKsMztQCGR3VAW 20XA== 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=86RJJSL7YjjQhbL493F/uMlQHWHyWfGrNB7Gw3ILe4U=; b=HsDsDYIOXoPVXC7JeNDKos92X+5MRVhzwY8qZVqPt3L+oc07EkgSZMl5xS0pppg4p+ 3C9K95kzLfjlqj56xnx7h1Ixy0kJ4GURxMvagIcJdlSQoDhfuOBG94AXBBz1OdKQyebv Da7fWHDXLNwNLTbsXblMl9BZ3Kohu/IcXBIu7rnsBcbfJmUL3GidqzmYCyaYwU/lzWmF a9KsfYNLmqoYk7EmqWLRtNa9nVQHowp5VeToj/gRsGZj70O1IO+42xGJ+UtA9L1sI5S0 01Wdp7g/zia6mSB8q3sifN/WOJe7NX3pDjsEMEdpVPt7EgfckDqfYu9Djuok6Mp17QL/ Qoxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wp0bvWtn; 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 o18si13548586jat.46.2021.08.02.06.51.32; Mon, 02 Aug 2021 06:51:43 -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=wp0bvWtn; 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 S234977AbhHBNul (ORCPT + 99 others); Mon, 2 Aug 2021 09:50:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:57092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234316AbhHBNr6 (ORCPT ); Mon, 2 Aug 2021 09:47:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0D3F061132; Mon, 2 Aug 2021 13:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912067; bh=FUwFnBGkynAjzqcf5Ktzdv3yj61peikDPukjaQG6TEM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wp0bvWtnGmHCnyskzqw7hTgpK4EEnNfomMWE/6CzDE5pQax+v4yG/3YM3JINKdvmw lfOhs9xEO1SxSrewJmULsbuR9QUZB+NmaeAIS8xDhjGBsjUew5L/Qn+fyzjCpqHQDM m9MJKLBZzHJTINDxOxPgAQw7QY+sq/ioHTuGaA4s= 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.9 08/32] sctp: move 198 addresses from unusable to private scope Date: Mon, 2 Aug 2021 15:44:28 +0200 Message-Id: <20210802134333.187295749@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134332.931915241@linuxfoundation.org> References: <20210802134332.931915241@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 8890fd66021d..9799c300603a 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h @@ -344,8 +344,7 @@ typedef enum { } sctp_scope_policy_t; /* 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. */ @@ -353,7 +352,6 @@ typedef 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 b2c242facf1b..b1932fd125da 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -413,7 +413,8 @@ static sctp_scope_t 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