How to force "feeds update -a" to use IPv6 only?

My ISP seems to have some intermitent routing issues to git.openwrt.org. Very often, when trying to update OpenWrt feeds in my build environment if fails. For example:

$ ./scripts/feeds update -a
Updating feed 'packages' from 'https://git.openwrt.org/feed/packages.git' ...
fatal: unable to access 'https://git.openwrt.org/feed/packages.git/': Failed to connect to git.openwrt.org port 443: Connection timed out
failed.
Updating feed 'luci' from 'https://git.openwrt.org/project/luci.git' ...
Already up to date.
(...)

Repeating this will randomly fail with a different repository, and only sometimes it finishes without errors. I've already mapped this to some issue with my ISP international routing (Vivo Fibra in Brazil). I have a separate backup connection (slower) and changing the internet connection to the backup ISP the feeds update always completes OK.

Question 1: is there a way to force "feeds update -a" to use IPv6 only? I would like to check if perhaps this could solve the problem.

BTW, I've noticed that there is an ongoing discussion in the openwrt-devel discussion list that all OpenWrt repositories (not only the main repository) are now mirrored to GitHub.

Question 2: Is there a way to easily replace all feeds in the build process to use GitHub only?

Depending on your DNS server you can suppress IPv4 name resolution for a given domain.
You can see (the opposite) example for dnsmasq here.

4 Likes

I was using Ubuntu in WSL2 to build OpenWrt, and I just discovered that WSL2 does not support IPv6 (it limits Linux to IPv4 only).

This way I just moved my OpenWrt build environment out of WSL2 into an Ubuntu VM (Hyper-V).

With a dual stack IPv4/IPv6 build seems to be working now (so no DNS tweaking required). So it seems that in fact that, while my ISP has IPv4 routing issues to git.openwrt.org, IPv6 routes is working fine.