dhcp periodicall effectively empties /etc/resolv.conf

Bug #158062 reported by y-man
4
Affects Status Importance Assigned to Milestone
dhcp (Ubuntu)
Low
Unassigned

Bug Description

Kubuntu 7.10

My DSL connection works fine for 1/2 to 1 hour or so then suddenly it cannot resolve any names to IP addresses.

My investigation showed me that between /etc/ppp/resolv.conf and /etc/resolv.conf the relation is as follows:

When all is good:
/etc/ppp/resolv.conf
   nameserver 1.2.3.4
   nameserver 2.3.4.5
/etc/resolv.conf
   nameserver 1.2.3.4
   nameserver 2.3.4.5
   search lan

After the failures set in:
/etc/ppp/resolv.conf
   nameserver 1.2.3.4
   nameserver 2.3.4.5
/etc/resolv.conf
   search lan
   nameserver 10.0.0.138

Once I found this, I went in and edit /etc/resolv.conf to make it good again, everything comes back to normal.

Adding name servers by prepend option in /etc/dhcp3/dhclient.conf did not help, it still gets cleared.

I consider this a bug in /usr/sbin/dhcdbd. It shoud have an option to not disturb it if a lease is live.

Revision history for this message
Qwerty Maniac (qwertymaniac) wrote :

Um, alternatively, if your /etc/resolv.conf gets changed automatically, you can prevent access to modifying it (Even root can't modify) by giving:

sudo chattr +i /etc/resolv.conf

(You can undo this by manually giving -i later, if you need something changed within)

Revision history for this message
Qwerty Maniac (qwertymaniac) wrote :

Though that above thing works only for EXT2/3 FS.

Revision history for this message
y-man (yavuz-teksavvy) wrote : [Bug 158062] Re: dhcp periodicall effectively empties /etc/resolv.conf

Yes, I had done that yesterday afternoon, and had a peaceful day afterwards.

This is workaround, but I am convinced dhcp needs fixing.

Thanks,

Yavuz

-----Original message-----
From: Qwerty Maniac <email address hidden>
Date: Mon, 29 Oct 2007 02:51:43 -0400
To: <email address hidden>
Subject: [Bug 158062] Re: dhcp periodicall effectively empties /etc/resolv.conf

> Um, alternatively, if your /etc/resolv.conf gets changed automatically,
> you can prevent access to modifying it (Even root can't modify) by
> giving:
>
> sudo chattr +i /etc/resolv.conf
>
> (You can undo this by manually giving -i later, if you need something
> changed within)
>
> --
> dhcp periodicall effectively empties /etc/resolv.conf
> https://bugs.launchpad.net/bugs/158062
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Yavuz Onder

Revision history for this message
Mario Young (mayeco) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at [WWW] https://wiki.ubuntu.com/Bugs/FindRightPackage. I have classified this bug as a bug in dhcp.

Revision history for this message
y-man (yavuz-teksavvy) wrote :

Hi Mario,

Thanks for the info.

I would like to ask another favour. I have another bug report (158169).
In that one to I left package open, as I was not sure. But further
observation convinced me that the bug is in Emacs.

Would you kindly set that package as well.

I guess, I might try to file a bug report with emacs developer too.

Thanks,

Yavuz

Mario Young wrote:
> Thank you for taking the time to report this bug and helping to make
> Ubuntu better. This bug did not have a package associated with it, which
> is important for ensuring that it gets looked at by the proper
> developers. You can learn more about finding the right package at [WWW]
> https://wiki.ubuntu.com/Bugs/FindRightPackage. I have classified this
> bug as a bug in dhcp.
>
> ** Changed in: dhcp (Ubuntu)
> Sourcepackagename: None => dhcp
>
>

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

If this bug is still affecting you in 8.10, you can uncomment and use the "prepend domain-name-servers" directive in /etc/dhcp3/dhclient.conf

Changed in dhcp:
importance: Undecided → Low
Revision history for this message
y-man (yavuz-teksavvy) wrote :

Have not see this for a long time, not even in 7.10. Thanks for advice.

Daniel T Chen wrote:
> If this bug is still affecting you in 8.10, you can uncomment and use
> the "prepend domain-name-servers" directive in /etc/dhcp3/dhclient.conf
>
> ** Changed in: dhcp (Ubuntu)
> Importance: Undecided => Low
>
>

Revision history for this message
Brian Murray (brian-murray) wrote :

This bug report is being closed due to your last comment regarding this being fixed with an update. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

Changed in dhcp (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions