IPv6: how to bind a site-local source address?

In IPv6, when I connect (or ping) a site-local address, the source address is also choosen as site-local, and when I connect a remote address, the source address is chosen as global:
Code:
$ ping -c 1 fd00::4202
PING6(56=40+8+8 bytes) fd00::4201 --> fd00::4202
16 bytes from fd00::4202, icmp_seq=0 hlim=64 time=0.498 ms

--- fd00::4202 ping6 statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.498/0.498/0.498/0.000 ms
$ ping -c 1  2a00:1450:4001:82f::2003
PING6(56=40+8+8 bytes) 2003:e7:1710:55ff::1 --> 2a00:1450:4001:82f::2003
16 bytes from 2a00:1450:4001:82f::2003, icmp_seq=0 hlim=60 time=23.212 ms

--- 2a00:1450:4001:82f::2003 ping6 statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 23.212/23.212/23.212/0.000 ms

I can override this for ping with the -S switch and force it to use a site-local source address
(which is 1-2 ms faster):

Code:
$ ping -S fd00::111 -c 1  2a00:1450:4001:82f::2003
PING6(56=40+8+8 bytes) fd00::111 --> 2a00:1450:4001:82f::2003
16 bytes from 2a00:1450:4001:82f::2003, icmp_seq=0 hlim=60 time=21.221 ms

--- 2a00:1450:4001:82f::2003 ping6 statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 21.221/21.221/21.221/0.000 ms

The problem is, firefox does not have such a -S switch. :(
They say, they do not bother and just let the routing layer (aka TCP stack) decide it all.

I tried to modify /etc/ip6addrctl.conf and remove any difference beween site-local and global addresses from there, but that does not change the behaviour. It doesn't seem to come from there.
 
Top