Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 149124

Summary: sys-libs/glibc : clients never reload /etc/resolv.conf when it changes
Product: Gentoo Linux Reporter: Xavier Maillard <zedek>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: VERIFIED FIXED    
Severity: normal    
Priority: High    
Version: 2006.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Force reload of /etc/resolv.conf whenever it is updated

Description Xavier Maillard 2006-09-25 15:13:47 UTC
/etc/resolv.conf seems to be read only on client's startup. 

Thus when changing IP or network, already running clients never know the content of any update in /etc/resolv.conf. This is very annoying on computers such as laptop which can fetch new network information through DHCP.

Here is patch that seems to do the trick for this situation.

Patch is from <URL:http://sources.redhat.com/ml/libc-alpha/2004-09/msg00130.html> with a few modifications to apply properly with glibc-2.4.

Feel free to add these modifications in the list of patches.
Comment 1 Xavier Maillard 2006-09-25 15:17:37 UTC
Created attachment 98071 [details, diff]
Force reload of /etc/resolv.conf whenever it is updated

Patch is small and really simple to read and to see what it does. Feel free to modify it.
Comment 2 SpanKY gentoo-dev 2006-09-25 16:39:22 UTC
doesnt this address what you want to do ?
http://sources.redhat.com/bugzilla/show_bug.cgi?id=984
Comment 3 Xavier Maillard 2006-09-26 14:44:02 UTC
(In reply to comment #2)
> doesnt this address what you want to do ?
> http://sources.redhat.com/bugzilla/show_bug.cgi?id=984

More or less. I already tried this but it did not work.

All I know is that either Debian and Ubuntu commited a patch like the one I am submitting[1].

Actually, this is the solely way I have found working for me.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=272265
Comment 4 SpanKY gentoo-dev 2006-09-26 15:25:09 UTC
point being that the patch/idea was proposed on the glibc mailing list and it was completely shot down

i'm not too keen on maintaining things where upstream flat out said no ... but that doesnt mean we will
Comment 5 Xavier Maillard 2006-09-26 16:15:22 UTC
Up to you guys :)

I opened a bug report since another people has the same problem. I recommended, as upstream does, to use nscd instead.

This is not vital to use or not the patch. What I want, is an elegant way to ack clients on resolv.conf update. If there is a clearer solution, I am likely to use it instead of this hack.

Oh, by the way, why did the patch get "shot down" ? It works.
Comment 6 SpanKY gentoo-dev 2006-09-26 20:01:37 UTC
upstream said to use nscd
Comment 7 Xavier Maillard 2006-09-27 15:36:44 UTC
Ok then you can close this bug report since nothing will be done.

Regards
Comment 8 Xavier Maillard 2006-09-27 15:37:32 UTC
Closing.