Please don't feel insulted, but I don't think another test is necessary. There is a problem with ipv6, I see that now. But the big question is: what's the reason for this problem? There has to be a small, but very important difference between version 18 and 19, that causes wget not being able to download, unless the command line option "-4" is used. And that option really has to be the command line option, it is even disregarded as part of a config file.
Maybe wget has been compiled incorrect, and the use of ipv6 has been hard-coded in, without any alternative. I don't know, but it would explain why this error even occurs right after flashing, without restoring and previously backed up options. You see: that is the part that puzzles me the most. If it happened after I restored my network settings, the case would be obvious. But the error even happens on the "naked" system, without any option altered or restored.
In other words: after flashing 18 and resetting, "opkg update" works, flashing 19 and resetting "opkg update" does not work. Same situation, just two different OS versions. I would say that limits the number of suspects very much.
I found the error. Or at least I found a way to circumvent it:
Because the trouble only happened when wget was involved (see above: traceroute, ping and dns was working), I came to the idea that it might be worth it to try another version of wget, So I downloaded the package wget-nossl from the repository, then I flashed version 19, without keeping settings, and then I copied the downloaded package onto the router, installed it and -voila!- suddenly opkg could download the package lists and additional packages.
Once wget was working, I replaced it with the ssl version. I couldn't install the ssl version before, because it has too many dependencies.
Even now, after applying all the necessary networking settings and installing all the required additional packages, I can still reproduce this error: as soon as I uninstall the package wget-ssl, opkg can't download anything at all again. If I re-install the package again, opkg can download again.
I can only think of one explanation of for this: the busybox version of wget is faulty and does not work with ip4, unless given "-4" as a command line argument.
This must have its origin in my ISP's dns, it can't be cast by my internal dnsmasq.
But even if wget receives an ipv6 information from my ISP: before exiting completely, it should try ip4. Especially, when you tell the OS not to load any ipv6 related modules in /etc/sysctl.conf. The program should notice that ipv6 does not work, while ip4 does work. So it behaved in previous versions, why can't it do so in version 19?
It happened again: this time I was using version 19.07 with a setup from scratch, so there could be no inherited burden from version 18 or earlier.
Yesterday I upgraded to 19.07.1. And of course I used the convenience to keep my settings. That is, I suppose, what this option is offered for, and upgrading from version X.07 to X.07.1 shouldn't cause any trouble.
But again, after the reboot, the package lists could not be downloaded. I had to download the package "wget" on my working machine, upload it to the router and install it manually. After that, "opkg" was functional.