Bug#628597: rdnssd sometimes removes nameservers it has just added

2011-06-02 Thread Pierre Ynard
Hello,



 I  don't know how and why this happens, but sometimes rdnssd thinks it
 got no  nameserver information, so it just removes everything from
 /etc/resolv.conf  or resolvconf leaving the system with the wrong
 resolver  configuration.

RDNSS information does expire when its lifetime is over, and removing
stale entries is correct and expected behavior. Is this the cause of
your problem? The current merge hook script may be blunt if resolvconf
is not installed, but the next version will remove only IPv6
nameservers.

 As the work-around, the merge hook can be modified to  replace the
 nameservers only if the rdnssd's internal resolv.conf isn't  empty.
 The patch to /etc/rdnssd/merge-hook is attached.

No, this isn't right in the general case because it would prevent
rdnssd from removing stale resolver information. Of course, until
handling of multiple nameserver configuration source is better
integrated system-wide, you're encouraged to modify the merge hook
script to suit your particular needs.

-- 
Pierre Ynard




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#628597: rdnssd sometimes removes nameservers it has just added

2011-05-30 Thread Andrew O. Shadoura
Package: rdnssd
Version: 1.0.1-1
Severity: normal
Tags: ipv6

I don't know how and why this happens, but sometimes rdnssd thinks it
got no nameserver information, so it just removes everything from
/etc/resolv.conf or resolvconf leaving the system with the wrong
resolver configuration.

As the work-around, the merge hook can be modified to replace the
nameservers only if the rdnssd's internal resolv.conf isn't empty.
The patch to /etc/rdnssd/merge-hook is attached.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.38-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages rdnssd depends on:
ii  adduser   3.112+nmu1 add and remove users and groups
ii  libc6 2.11.2-2   Embedded GNU C Library: Shared lib

Versions of packages rdnssd recommends:
ii  resolvconf1.48   name server information handler

Versions of packages rdnssd suggests:
ii  ndisc61.0.1-1IPv6 diagnostic tools

-- no debconf information
--- a/merge-hook
+++ b/merge-hook
@@ -17,9 +17,15 @@
 # *  along with this program. If not, see http://www.gnu.org/licenses/. *
 # *
 
-PATH=/sbin:/bin
+PATH=/sbin:/bin:/usr/bin
 INPUT=/var/run/rdnssd/resolv.conf
 
+nonempty=$(wc -w  $INPUT)
+
+if [ $nonempty = 0 ]; then
+   exit
+fi
+
 if [ -x /sbin/resolvconf ]; then
/sbin/resolvconf -a 000.rdnssd  $INPUT
 else