Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 94400 - glibc: gethostbyname should respond to changes in resolv.conf
Summary: glibc: gethostbyname should respond to changes in resolv.conf
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://sources.redhat.com/bugzilla/sh...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-29 10:36 UTC by Martin von Gagern
Modified: 2005-06-01 08:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2005-05-29 10:36:24 UTC
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
Comment 1 SpanKY gentoo-dev 2005-05-29 15:58:09 UTC
confirmed that glibc seems to only read resolv.conf once

this is an upstream thing, Gentoo patches dont affect it ...
Comment 2 Martin von Gagern 2005-06-01 08:10:28 UTC
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?
Comment 3 SpanKY gentoo-dev 2005-06-01 08:57:53 UTC
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