Bug 18279 - Long running programs don't detect resolv.conf being updated when roaming
Summary: Long running programs don't detect resolv.conf being updated when roaming
Status: RESOLVED DUPLICATE of bug 984
Alias: None
Product: glibc
Classification: Unclassified
Component: network (show other bugs)
Version: 2.20
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-18 19:14 UTC by Philip Prindeville
Modified: 2015-08-24 09:43 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Prindeville 2015-04-18 19:14:29 UTC
Thanks to the stability of Linux, I run it on my laptop and leaving it running for weeks at a time. During that time, I might (a) have Thunderbird running and (b) roam from my home wired network on my docking station to a Wifi hotspot at an airport or Starbucks or hotel to the office wired network and back again.

Unfortunately, during this time, /etc/resolv.conf will get rewritten by dhclient multiple times, but the contents that were in it when Thunderbird (for example) originally started will long have become irrelevant.

A simple fix would be to either stat() /etc/resolv.conf or to have inotify() detect when /etc/resolv.conf has been written, deleted, or created and to re-run res_init() at that time.

It might be possible to configure /etc/resolv.conf to point to a local proxy which then is a little smarter about detecting network configuration changes, but most distros aren't going to do that: it's complexity that they don't want to deal with, and it complicates troubleshooting for the end-user.

Or you could tell users to shutdown and restart all of their applications because libresolv doesn't handle roaming, but I don't think that advice will be well received either.

We're living in the age of pervasive internet, and we roam constantly because we can.

Time for libresolv to get caught up to a 21st century paradigm. This isn't 1985 anymore.
Comment 1 Joseph Myers 2015-08-24 09:43:21 UTC
Duplicate.

*** This bug has been marked as a duplicate of bug 984 ***