Get stale DNS information after PPP session starts

Bug #79600 reported by Daniel J Blueman
2
Affects Status Importance Assigned to Milestone
ppp (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: ppp

When the ppp daemon establishes a connection, the /etc/ppp/ip-up.d/0000usepeerdns file is executed (after, the corresponding ip-down.d/0000usepeerdns file is also executed).

Where the pppd "usepeerdns" config options is used (most cases), the 0000usepeerdns scripts test for the nscd (name service cache daemon) being running incorrectly [1], so does not restart it.

The correct pid file to test for is /var/run/nscd/nscd.pid. Also, rather than restarting the service and flushing everything, it is better to invalidate just the hosts [2].

Diff against original files is in [3]. Apply with 'patch -l'.

--- [1]

if [ -e /var/run/nscd.pid ]; then
  /etc/init.d/nscd restart || true
fi

--- [2]

[ -e /var/run/nscd/nscd.pid ] && nscd -i hosts

--- [3]

--- ip-up.d/0000usepeerdns.orig 2007-01-16 18:06:12.000000000 +0000
+++ ip-up.d/0000usepeerdns 2007-01-16 18:06:57.000000000 +0000
@@ -25,8 +25,8 @@
 mv -f "$REALRESOLVCONF.tmp" "$REALRESOLVCONF"

 # restart nscd because resolv.conf has changed
-if [ -e /var/run/nscd.pid ]; then
- /etc/init.d/nscd restart || true
+if [ -e /var/run/nscd/nscd.pid ]; then
+ nscd -i hosts
 fi

 exit 0

--- ip-down.d/0000usepeerdns.orig 2007-01-16 18:08:58.000000000 +0000
+++ ip-down.d/0000usepeerdns 2007-01-16 18:09:20.000000000 +0000
@@ -15,8 +15,8 @@
   mv -f $REALRESOLVCONF.pppd-backup $REALRESOLVCONF

   # restart nscd because resolv.conf has changed
- if [ -e /var/run/nscd.pid ]; then
- /etc/init.d/nscd restart || true
+ if [ -e /var/run/nscd/nscd.pid ]; then
+ nscd -i hosts
   fi
 fi

description: updated
Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 alpha?

Changed in ppp:
importance: Undecided → Medium
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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