I want an openvpn daemon to be running all the time and establish a VPN as soon as its remote host is reachable. I have a wide variety of possible network connections, including some that require manual interaction. So in most cases dns is not available when openvpn comes up. But when I establish a connection and dns starts working, openvpn does not notice this and keeps using the things it read from resolv.conf before. I have to restart openvpn to use the changed dns settings. This thing about openvpn is just an example, I believe there might be many programs around where it could be useful to respond to changed dns settings on the fly. If performance is an issue, perhaps it would be possible to reread resolv.conf only if there is no answer from the name server. As I guess this problem should be addressed in glibc, I made this a core system bug. I reported this bug here first because I don't know how much gentoo patches might affect the behaviour of glibc. If this is a problem to be addressed upstream, please tell me so. Reproducible: Always Steps to Reproduce: 1. start openvpn 2. establish basic network connection 3. look at openvpn log Actual Results: Error resolving hostname, even if this works for newly started processes Expected Results: Host name resolved successfully after resolv.conf chenged
confirmed that glibc seems to only read resolv.conf once this is an upstream thing, Gentoo patches dont affect it ...
Should be possible using "nscd -i hosts" according to http://sources.redhat.com/bugzilla/show_bug.cgi?id=984 Maybe this command should be added to gentoo net init scripts?
if by 'gentoo init scripts' you mean the nscd script, then feel free to post a patch to update it ... ive never used nscd before so i'm not famil with it