Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Mar 2020 20:28:33 +0100
From:      Jan Behrens <jbe-mlist@magnetkern.de>
To:        freebsd-net@freebsd.org
Subject:   ifconfig prefer_source and IPv6 privacy extensions
Message-ID:  <20200313202833.cbbe8d1679ac0fd7a80788e1@magnetkern.de>

next in thread | raw e-mail | index | archive | help
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::<modified EUI-64>%<interface>
ULA:            fd<prefix>:<modified EUI-64>
ULA privacy:    fd<prefix>:<randomized>
Public:         2003:<prefix>:<modified EUI-64>
Public privacy: 2003:<prefix>:<randomized>

When I setup a static IPv6 address in the ULA range, such as
(fd<prefix>::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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200313202833.cbbe8d1679ac0fd7a80788e1>