pppd makes a resolv.conf backup, then pppd-dns immediately restores it

Bug #49151 reported by Elie Morisse
34
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ppp (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Steps to reproduce :
(1/Buy a serial or USB modem)
2/Configure through the "networking" method ( not "ppp" ), e.g adding those lines into /etc/network/interfaces and using the "usepeerdns" option :
auto ppp0
iface ppp0 inet ppp
  provider speedtch
3/Reboot. Score : ppp0 is up, but ISP DNS are not registered in /etc/resolv.conf, so I can't even ask for help on Ubuntu forums

What happens ? The problem is located inside the rcS.d folder : S40networking uppes ppp0, pppd negociates the ISP DNS, backups resolv.conf and after all writes down the ISP DNS into the file, but ere S55pppd-dns immediately restores the backup so the changes made by pppd are cancelled.

pppd-dns seems to be designed for the obsolete ( since years ) init.d/ppp script, not for init.d/networking, am i right ? If so, shouldn't it be removed along the whole obsolete stuff, then replaced by a if-up.d script ?

Anyway this is a very serious bug and is making every non-Ethernet modems owners very unhappy ( well actually only those requiring a connection at boot ), especially users of my speedtouch-ng package :( ( a configuration helper for Speedtouch USB/330 modems : http://moigeeknevro.com/speedtouch-ng/files/1.2.4/ )

I've fixed it through modifying the boot sequence order so the pppd-dns runs before networking, i.e :

sudo update-rc.d -f pppd-dns remove
sudo update-rc.d pppd-dns start 39 S .

Is this susceptible to break something ?

Elie Morisse (lachienne)
description: updated
Revision history for this message
Elie Morisse (lachienne) wrote :

Please ! Why don't you fix it ? I just see that Debian make it a S38, just like you before..

Revision history for this message
Stefan Daniel Schwarz (Wolfram Ravenwolf) (stefandanielschwarz) wrote :

I've been bitten by this bug, too, until I figured out what's wrong. I wanted to report it, but found this bug report instead, so I'm adding a comment.

As Elie Morisse explained already, the boot order has changed from Breezy to Dapper, now /etc/init.d/pppd-dns is linked to /etc/rcS.d/S55pppd-dns instead of /etc/rcS.d/S38pppd-dns as it used to be. Since it runs after networking is brought up (which, thanks to pppoeconf, already has activated the ppp connection), it discards the (until then valid) /etc/resolv.conf. We end up with an established ppp connection but without DNS servers to resolve domain names.

The work-around would be to disconnect (sudo poff) and reconnect (pon), but a real fix is changing the boot order back to how it was set up under Breezy. I'm pretty sure a lot of people don't even notice that the ppp connection is up and that the DNS is being mangled, instead they will assume that there's no Internet connection after boot-up, despite having configured it that way. In addition to that, bringing up a working Internet connection on boot up is vital for headless servers, so I consider this bug of high importance.

Thanks,
-- Stefan D. Schwarz

Revision history for this message
Stefan Daniel Schwarz (Wolfram Ravenwolf) (stefandanielschwarz) wrote :

Here's how I fixed it:

sudo mv /etc/rcS.d/S55pppd-dns /etc/rcS.d/S38pppd-dns

By the way, /etc/rcS.d/S39dns-clean (Breezy) changed into /etc/rcS.d/S55dns-clean (Dapper) as well, although its comments clearly indicate "It should never be run while ppp is up." - which happens at S40networking! Somehow the boot order got mixed up quite a bit, causing hard to troubleshoot problems...

Thanks in advance for investigating and fixing this bug,
-- Stefan D. Schwarz

Changed in ppp:
status: Unconfirmed → Confirmed
Revision history for this message
Konstantinos Togias (ktogias) wrote :

This bug is still present at Ubuntu 9.10 . I reproduced on a Ubuntu 9.10 server install and fixed it with the workaround described at the bug description.

Revision history for this message
Torsten Spindler (tspindler) wrote :

The bug also seems to hit network-manager based system connections that are established upon starting network-manager. This happens in Ubuntu 10.04 LTS.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.