Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 149124 - sys-libs/glibc : clients never reload /etc/resolv.conf when it changes
Summary: sys-libs/glibc : clients never reload /etc/resolv.conf when it changes
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
Depends on:
Reported: 2006-09-25 15:13 UTC by Xavier Maillard
Modified: 2006-09-27 15:37 UTC (History)
0 users

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

Force reload of /etc/resolv.conf whenever it is updated (glibc-gentoo-reload-conf.patch,1017 bytes, patch)
2006-09-25 15:17 UTC, Xavier Maillard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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:> 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 ?
Comment 3 Xavier Maillard 2006-09-26 14:44:02 UTC
(In reply to comment #2)
> doesnt this address what you want to do ?

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.

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.

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