[Bug 6788] New: udhcpc / empty DNS config should not overwrite existing /etc/resolv.conf
bugzilla at busybox.net
bugzilla at busybox.net
Sat Jan 11 10:14:28 UTC 2014
https://bugs.busybox.net/show_bug.cgi?id=6788
Summary: udhcpc / empty DNS config should not overwrite
existing /etc/resolv.conf
Product: Busybox
Version: 1.20.x
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P5
Component: Networking
AssignedTo: unassigned at busybox.net
ReportedBy: andreas at heissenberger.at
CC: busybox-cvs at busybox.net
Estimated Hours: 0.0
This behavior is different to the behavior of the DHCP Client under
debian/ubuntu where an empty DNS entry will not delete the existing
/etc/resolv.conf
example:
udhcpc -i eth0
udhcpc (v1.20.2) started
Sending discover...
Sending select for 10.0.2.15...
Lease of 10.0.2.15 obtained, lease time 86400
deleting routers
route: SIOCDELRT: No such process
adding dns 10.0.2.2
sets /etc/resolv.conf:
search me
nameserver 10.0.2.2
udhcpc -i eth1
udhcpc (v1.20.2) started
Sending discover...
Sending select for 192.168.56.105...
Lease of 192.168.56.105 obtained, lease time 1200
sets /etc/resolv.conf (empty):
I suggest to only reset /resov.conf in case of an existing nameserver entry:
/usr/share/udhcpc/default.script
@@ -28,7 +28,9 @@ case "$1" in
done
fi
- echo -n > $RESOLV_CONF
+ if [ -n "$dns" ] ; then
+ echo -n > $RESOLV_CONF
+ fi
[ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
for i in $dns ; do
echo adding dns $i
--
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list