On Wed, 2009-11-18 at 08:46 +0000, Frederik Himpe wrote: > On Tue, 17 Nov 2009 14:34:16 -0800, Dan Williams wrote: > > >> Looking at resolvconf's man page, I guess that NetworkManager only > >> calls networkmanager -a, which will add stuff to resolvconf, but does > >> not call resolvconf -d first to clean up the outdated entries. > >> > >> This seems to happen in src/named-manager/nm-named-manager.c in > >> dispatch_resolvconf. > >> > >> I can indeed reproduce the problem by running resolvconf -a > >> NetworkManager and then sending a new nameserver: it will simply be > >> added to resolv.conf without removing the old one. > > > > Ah, maybe we should call -d unconditionally before calling -a. That > > might explain a few things. > > I did some more tests, and it seems I was totally wrong. resolvconf -a > really overwrites the settings for the chosen interface. So it seems > there is no problem in NetworkManager itself. > > I guess the problem comes from an interaction problem with some Mandriva > scripts, maybe from when I did not yet have all connections disabled in > Mandriva's networking tools. I had a file > /var/run/resolvconf/interface/eth0 which contained the faulty resolv.conf > entries. Removing this file, so that only > /var/run/resolvconf/interface/NetworkManager exists, fixes this.
Ah, thanks for investigating that. > >> Actually, I'm surprised to see that NM always calls resolvonf with the > >> name NetworkManager as INTERFACE name. I rather expected it to call it > >> with the UUID or interface name of the connection, so that it simply > >> calls resolvonf -a UUID (or IFNAME) for every connection which comes > >> online, and resolvconf -d UUID/IFNAME for every connection going down. > >> But I guess you don't want this because NM wants to take complete > >> control of resolv.conf instead of letting the contents be managed by > >> resolvconf? > > > > It's mainly to kludge in support for resolvconf; I'm not sure the > > original patch had that in it it. That sounds like a good improvement > > though, but we need to figure out a few things first... > > > > Like VPNs. If I connect wifi (and send those nameservers to resolvconf) > > then connect a VPN (and send those), then plug in a wired cable (and > > send those), aren't the VPN's nameservers now not used? NM will ensure > > they do get used. > > resolvonf will merge the different nameserver entries for all > connections, and add all nameserver entries according to the order > configured in /etc/resolvconf/interface-order. In Debian this files looks > like this: > lo.inet* > lo.dnsmasq > lo.pdnsd > lo.!(pdns|pdns-recursor) > lo > tun* > tap* > hso* > eth* > ath* > wlan* > ppp* > * > > In Mandriva it looks like this: > lo.inet* > lo.dnsmasq > lo.pdnsd > lo.!(pdns|pdns-recursor) > lo > tun* > tap* > * > > They removed the entries for wired and wireless connections because they > patched resolvconf to use the metric value for those interfaces to order > the nameservers. Ah! This has been quite informative. Thanks. Dan _______________________________________________ NetworkManager-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/networkmanager-list
