From owner-freebsd-net@freebsd.org Fri Mar 13 19:28:43 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 3D096267E73 for ; Fri, 13 Mar 2020 19:28:43 +0000 (UTC) (envelope-from jbe-mlist@magnetkern.de) Received: from sapphire.magnetkern.de (sapphire.magnetkern.de [185.228.139.199]) by mx1.freebsd.org (Postfix) with ESMTP id 48fG2d0XRSz3DtX for ; Fri, 13 Mar 2020 19:28:40 +0000 (UTC) (envelope-from jbe-mlist@magnetkern.de) Received: from titanium (p5DD45F4F.dip0.t-ipconnect.de [93.212.95.79]) by sapphire.magnetkern.de (Postfix) with ESMTPSA id B0EB13DE4 for ; Fri, 13 Mar 2020 19:28:33 +0000 (UTC) Date: Fri, 13 Mar 2020 20:28:33 +0100 From: Jan Behrens To: freebsd-net@freebsd.org Subject: ifconfig prefer_source and IPv6 privacy extensions Message-Id: <20200313202833.cbbe8d1679ac0fd7a80788e1@magnetkern.de> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48fG2d0XRSz3DtX X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jbe-mlist@magnetkern.de designates 185.228.139.199 as permitted sender) smtp.mailfrom=jbe-mlist@magnetkern.de X-Spamd-Result: default: False [2.81 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_MEDIUM(1.00)[0.997,0]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[magnetkern.de]; MV_CASE(0.50)[]; NEURAL_SPAM_LONG(0.97)[0.971,0]; IP_SCORE(0.54)[ipnet: 185.228.136.0/22(3.34), asn: 197540(-0.60), country: DE(-0.02)]; RCVD_NO_TLS_LAST(0.10)[]; RECEIVED_SPAMHAUS_PBL(0.00)[79.95.212.93.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:197540, ipnet:185.228.136.0/22, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 19:28:43 -0000 Dear all, I'm using FreeBSD 12.1 with an ISP that supports IPv6. I have IPv6 privacy extensions enabled (ipv6_privacy="YES" in /etc/rc.conf which sets net.inet6.ip6.prefer_tempaddr=1). Given my router and ISP (who supports IPv6), my machine's FreeBSD system assigns me 5 addresses through IPv6 autoconfiguration: link-local: fe80::% ULA: fd: ULA privacy: fd: Public: 2003:: Public privacy: 2003:: When I setup a static IPv6 address in the ULA range, such as (fd::2) and enable the "prefer_source" option (see man ifconfig), the "prefer_source" option is ignored. It seems that net.inet6.ip6.prefer_tempaddr=1 takes precedence. Calling sysctl net.inet6.ip6.prefer_tempaddr=0 fixes my problem but disables privacy extensions altogether (which I would like to keep enabled). Is it intended that "net.inet6.ip6.prefer_tempaddr" takes precedence over "prefer_source"? If yes, why? Kind regards, Jan Behrens