From owner-freebsd-net@freebsd.org Tue Sep 8 00:18:04 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40F3D3DA4F8 for ; Tue, 8 Sep 2020 00:18:04 +0000 (UTC) (envelope-from SRS0=v5e9=CR=mail.sermon-archive.info=doug@sermon-archive.info) Received: from mail.sermon-archive.info (sermon-archive.info [71.177.216.148]) by mx1.freebsd.org (Postfix) with ESMTP id 4Blm2M3dcLz3fbW for ; Tue, 8 Sep 2020 00:18:03 +0000 (UTC) (envelope-from SRS0=v5e9=CR=mail.sermon-archive.info=doug@sermon-archive.info) Received: from [10.0.1.251] (mini [10.0.1.251]) by mail.sermon-archive.info (Postfix) with ESMTPSA id 4Blm2L5BBHz2fjTp; Mon, 7 Sep 2020 17:18:02 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Subject: Re: Address Differences between UDP and SCTP From: Doug Hardie In-Reply-To: <7CF5C0CF-A173-4253-9F93-70199578A8F7@lurchi.franken.de> Date: Mon, 7 Sep 2020 17:18:02 -0700 Cc: freebsd-net@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <6DB5BF95-F7D8-4933-8633-644A553E8C75@mail.sermon-archive.info> References: <6A9D0A4B-F35C-4012-A868-5450D60EC13B@mail.sermon-archive.info> <7CF5C0CF-A173-4253-9F93-70199578A8F7@lurchi.franken.de> To: Michael Tuexen X-Mailer: Apple Mail (2.3445.104.15) X-Virus-Scanned: clamav-milter 0.101.4 at mail X-Virus-Status: Clean X-Rspamd-Queue-Id: 4Blm2M3dcLz3fbW X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of SRS0=v5e9=CR=mail.sermon-archive.info=doug@sermon-archive.info designates 71.177.216.148 as permitted sender) smtp.mailfrom=SRS0=v5e9=CR=mail.sermon-archive.info=doug@sermon-archive.info X-Spamd-Result: default: False [-1.58 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.982]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:71.177.216.148:c]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[lafn.org: no valid DMARC record]; NEURAL_HAM_LONG(-1.00)[-0.998]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.20)[-0.197]; RCPT_COUNT_TWO(0.00)[2]; FORGED_SENDER(0.30)[bc979@lafn.org,SRS0=v5e9=CR=mail.sermon-archive.info=doug@sermon-archive.info]; RCVD_NO_TLS_LAST(0.10)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:5650, ipnet:71.177.216.0/23, country:US]; FROM_NEQ_ENVFROM(0.00)[bc979@lafn.org,SRS0=v5e9=CR=mail.sermon-archive.info=doug@sermon-archive.info]; MAILMAN_DEST(0.00)[freebsd-net]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2020 00:18:04 -0000 > On 7 September 2020, at 13:57, Michael Tuexen = wrote: >=20 > For UDP and TCP you always get IPv6 addresses on AF_INET6 sockets. If = you are actually using IPv4, IPv4-mapped IPv6 addresses are used. For = SCTP you an choose if you want IPv4-mapped IPv6 addresses or IPv4 = address. It is controlled by > the socket option specified in = https://tools.ietf.org/html/rfc6458#section-8.1.15 I used: optval =3D 1; rc =3D setsockopt (recv_fd, IPPROTO_IPV6, = SCTP_I_WANT_MAPPED_V4_ADDR, &optval, sizeof(optval)); FreeBSD 12.1. Result was "Operation not supported" -- Doug