I think I've finally fixed things to my satisfaction, system-wide:
$ cat getaddrinfo_wrap.c // getaddrinfo wrapper
#include <dlfcn.h>
#define getaddrinfo _foo
#include <netdb.h>
#undef getaddrinfo
int getaddrinfo(const char *node, const char *service, struct addrinfo *hints,
struct addrinfo **res)
{
typedef int (*FP_getaddrinfo)(const char*, const char*, struct addrinfo*,
struct addrinfo **);
FP_getaddrinfo org_getaddrinfo = dlsym(((void *) -1), "getaddrinfo");
hints->ai_flags|=AI_ADDRCONFIG;
return org_getaddrinfo(node, service, hints, res);
}
gcc -fPIC -c -Wall getaddrinfo_wrap.c getaddrinfo_wrap.o
gcc -shared getaddrinfo_wrap.o -ldl -lstdc++ -o getaddrinfo_wrap.so
sudo cp getaddrinfo_wrap.so /usr/local/lib/
sudo chown root:root /usr/local/lib/getaddrinfo_wrap.so
sudo sh -c "echo /usr/local/lib/getaddrinfo_wrap.so >> /etc/ld.so.preload"
There. No more problems.
BTW, I do have ipv6 interfaces after stripping all my ipv4 hacks from above,
that seems utterly irrelevant to this finally working.
I of course have no idea what the results of this could be on various apps, but
at least the ones I use seem happy.
--
Manual ipv6 settings only work for users but not for system
https://bugs.launchpad.net/bugs/465841
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs