Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sctp: move 198 addresses from unusable to private scope

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 <surkamp@gmail.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Xin Long and committed by
David S. Miller
1d11fa23 650b2a84

+3 -4
+1 -3
include/net/sctp/constants.h
··· 360 360 #define SCTP_SCOPE_POLICY_MAX SCTP_SCOPE_POLICY_LINK 361 361 362 362 /* Based on IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>, 363 - * SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 198.18.0.0/24, 364 - * 192.88.99.0/24. 363 + * SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 192.88.99.0/24. 365 364 * Also, RFC 8.4, non-unicast addresses are not considered valid SCTP 366 365 * addresses. 367 366 */ ··· 368 369 ((htonl(INADDR_BROADCAST) == a) || \ 369 370 ipv4_is_multicast(a) || \ 370 371 ipv4_is_zeronet(a) || \ 371 - ipv4_is_test_198(a) || \ 372 372 ipv4_is_anycast_6to4(a)) 373 373 374 374 /* Flags used for the bind address copy functions. */
+2 -1
net/sctp/protocol.c
··· 398 398 retval = SCTP_SCOPE_LINK; 399 399 } else if (ipv4_is_private_10(addr->v4.sin_addr.s_addr) || 400 400 ipv4_is_private_172(addr->v4.sin_addr.s_addr) || 401 - ipv4_is_private_192(addr->v4.sin_addr.s_addr)) { 401 + ipv4_is_private_192(addr->v4.sin_addr.s_addr) || 402 + ipv4_is_test_198(addr->v4.sin_addr.s_addr)) { 402 403 retval = SCTP_SCOPE_PRIVATE; 403 404 } else { 404 405 retval = SCTP_SCOPE_GLOBAL;