Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54994 - ip-up script shouldn't change /etc/resolv.conf when a dnsd (dnsmasq/pdnsd) is running
Summary: ip-up script shouldn't change /etc/resolv.conf when a dnsd (dnsmasq/pdnsd) is...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-24 03:02 UTC by Michael Rolf
Modified: 2005-06-01 22:25 UTC (History)
0 users

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


Attachments
ip-updown.diff (ip-updown.diff,1.02 KB, patch)
2004-09-16 17:12 UTC, Alan Swanson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rolf 2004-06-24 03:02:39 UTC
I use dnsmasq to handle nameserver changes by calling different ISP with pppd and usepeerdns option (because wwwoffle can't handle a later change of the nameserver in resolv.conf / see FAQ on the wwwoffle webside).
In this configuration the nameserver in /etc/resolv.conf must be fixed on 127.0.0.1. dnsmasq uses /etc/ppp/resolv.conf for the correct nameserver (including  polling the file for changes).

Now I'm missing a configuration or a perhaps a way of autodetection that in this situation the ip-up script doesn't change the nameservers in /etc/resolv.conf.


Reproducible: Always
Steps to Reproduce:
1. emerge dnsmasq and pppd 
2. configure dnsmasq, pppd and the nameserver 127.0.0.1 in /etc/resolv.conf
3. build up a pppd connection with option USEPEERDNS

Actual Results:  
The dnsmasq daemon isn't used anymore for dns queries, because of the ip-up
script changes in /etc/resolv.conf

Expected Results:  
The nameserver in /etc/resolv.conf should still be 127.0.0.1, dnsmasq detects
the changes in /etc/ppp/resolv.conf and uses this new nameservers.

Perhaps the ip-up script could be changed, so that it doesn't change
/etc/resolv.conf if the nameserver there is localhost?
Comment 1 Daniel Black (RETIRED) gentoo-dev 2004-08-29 04:36:07 UTC
Good idea Michael - feel free to submit a patch.
Comment 2 Alan Swanson 2004-09-16 17:12:08 UTC
Created attachment 39729 [details, diff]
ip-updown.diff

Patch to the ip-up and ip-down scripts for ppp 2.4.2.

This is basically what I use so as to not replace the /etc/resolv.conf when
using a local nameserver (dnsmasq). Also includes a check for
/etc/ppp/resolv.conf which most other distributions have.
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2005-06-01 22:25:54 UTC
quote from pppd man page:
       usepeerdns
              Ask  the peer for up to 2 DNS server addresses.  The addresses
supplied by the peer
              (if any) are passed to the /etc/ppp/ip-up script in the
environment variables  DNS1
              and  DNS2,  and the environment variable USEPEERDNS will be set to
1.  In addition,
              pppd will create an /etc/ppp/resolv.conf file  containing  one  or
 two  nameserver
              lines with the address(es) supplied by the peer.

I don't see why we should refuse to use peer DNS when someone has 127.0.0.1 as
nameserver in its original resolv.conf. 
If user decided to use it, why denying its right to do so?