how do i convince Alpine Linux that it doesn't have IPv4 connectivity? when i run e.g. "ping bbc.co.uk", it picks the IPv4 address first, even though it doesn't have a default route.

i can't disable IPv4 because i need it for Wireguard.

i can't use /etc/gai.conf because musl libc doesn't support that.

this makes e.g. apk very slow because it waits for IPv4 to time out before it tries IPv6. i don't understand why it doesn't immediately get "no route to host" over IPv4...

any ideas?

#ipv6 #alpinelinux

@lw why is IPv4 being preferred anyway are you using ULAs

@lucasmz "why is IPv4 being preferred?" is exactly what i'm asking :D

i do use ULAs internally, but that shouldn't affect "ping bbc.co.uk" since it has a GUA.

@lucasmz although, perhaps this is related to the host itself having a ULA, so it prefers the IPv4 address. but this doesn't seem to be configurable in musl :-/

on FreeBSD it just works, since it realises the host has no IPv4 connectivity.

@lw I did have weirdness when having ULAs (first time trying openwrt) with preference, but yeah not sure...