Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1052464pxv; Thu, 22 Jul 2021 20:59:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy25fTqwlCL2OIVSqm5+MN48KA7qY7Yh2oPbbAKlPSb5Mh8JV1KtPo7uA8a6xmSkwnCGSG2 X-Received: by 2002:a05:6402:5250:: with SMTP id t16mr3276361edd.317.1627012764615; Thu, 22 Jul 2021 20:59:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627012764; cv=none; d=google.com; s=arc-20160816; b=nlF0KqxH4bh/PON0nK4ZqLQjrHOBDaSLg+Lq7Y7+bQ/0wSJCX4/xlWX9zemPMknuOl vOLqlZeBlcstPHze/3lMzGOE9zhutDaWOR5bgfns420RpZK2EXXyhUY0ioAXwjVIIv0V XVuXmK8ry2hCILaHZLSXKYANn8hCI/hnSrXLb6zq8Lf58FOjNWk18VM9epulVMgvoN2r QAdTEoE2jMkbNytR7og5GI75qvxSSliPbTxhCAy3o1XCLiAGlRQgZeft7shq1x+KFo67 y6nSvr3sJJEY0DbJpnRCY8LgolfWlWJV1DlGr9e3o5vEoRpuHGCDsJ9ZHUH5MAOvfUhr cniQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2WzF4DvN9rw+ziTPFtZn1DfUFoAW/IfoUvPQl+N66FU=; b=zkTLmUpBS6o61oHEAq9dE0hXz/q+cW8KiWJXo5S13hKsWOLlgRcKYBDM5kLBIxElQi z2/Dkc5OZT312Te/9Gju4T5ssR4u0yYwntAgs3K+fik7525/zZCYe1wKrGdn+0PyWdLO h0DV93kTpwh1ghO8NKPZhYnRsKQxp9Xxdbl7H1iUeE+woBkrgeyEBvbrPiSdp+/clZgD GtN4yyzh6M812GPHzjlbp7TD1fXUQFtwELBTSMB/OQ9sipIcpGH9FrkFbDoJHkcdcfZu PgShumJldFKRpr6PBPydml9bsaU1+3F0ppZWot0dAaBU+MPVRuJ0uOWpXN3XI2S9pOrC fnSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cjMzWGMU; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w25si30359854eja.725.2021.07.22.20.59.01; Thu, 22 Jul 2021 20:59:24 -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=@kernel.org header.s=k20201202 header.b=cjMzWGMU; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233690AbhGWDQ5 (ORCPT + 99 others); Thu, 22 Jul 2021 23:16:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:36944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233638AbhGWDQx (ORCPT ); Thu, 22 Jul 2021 23:16:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 469F960ED7; Fri, 23 Jul 2021 03:57:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627012647; bh=zOoCF+HS6tH6/uMM57hvO1ALQwVAf4hdAFDbogkm7xY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cjMzWGMUuZZH26FHQ4mcJy/dmuo1rPtCxTTjaIo1s40B7AOygpbZ9lC+MEgUPwoS1 oe6UveaRJcPWdbLm1DDB/1cRHstkGqS8D9fmtSV0vhL7XS3rg6QvRoiAbD8bb6N6Xe yhuYTMNEw75yEkMXPFDvQ+jzkEHvbMDY2xOhO1E3tWbY6TuiATq42tc7aAgIwDVkbl ia9zVftxkIJI/3CPxfOFY3g+1x+qLGI7h007lwQnN1Gr88vGcLVQwR/Xak3nb6gG1f ZXarR9X3nuxp2WcavVaaiUfIASGBIVvf96sGzE7xDmXPBBQ5qX8JLkIUt4Rr+jZ+vW uGn9GFUVfmUDA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Xin Long , =?UTF-8?q?S=C3=A9rgio?= , Marcelo Ricardo Leitner , "David S . Miller" , Sasha Levin , linux-sctp@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.13 04/19] sctp: move 198 addresses from unusable to private scope Date: Thu, 22 Jul 2021 23:57:05 -0400 Message-Id: <20210723035721.531372-4-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210723035721.531372-1-sashal@kernel.org> References: <20210723035721.531372-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore 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 14a0d22c9113..bf23a2ed92da 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h @@ -342,8 +342,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. */ @@ -351,7 +350,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 6f2bbfeec3a4..603049aa4950 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -393,7 +393,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