bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.

Mozilla extremely slow at noticing /etc/resolv.conf changes



MailNews Core
15 years ago
10 years ago


(Reporter: Jason Haar, Assigned: Scott MacGregor)


Firefox Tracking Flags

(Not tracked)




15 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.3) Gecko/20030312
Build Identifier: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.3) Gecko/20030312

I'm forever going into and out of VPN mode on my Linux box. Whenever I do, my
/etc/resolv.conf file is changed to match the new environment.

With Mozilla mail running, I find that it takes AGES for Mozilla to figure out
some major network change has occured, and that maybe it should see if the
/etc/resolv.conf file has been changed. I know this via tcpdump - you can see
Mozilla using the now defunct DNS IP addresses instead of the ones referred to
in the current /etc/resolv.conf

Reproducible: Always

Steps to Reproduce:
1. Log into an IMAP server on the Internet
2.go into a VPN-mode - now your IMAP server has an internal address according to
the now-live DNS
3. Find that Mozilla is still trying to connect to that IMAP server via it's
Internet address instead of the internal address.
Actual Results:  
Mozilla hangs. To be honest, I don't know what fixes it. I just keep going
offline/online until it starts working again - restarting Mozilla would probably
be quicker...

Expected Results:  
How about whenever Mozilla has to wait >10 sec for any new connection, it
rechecks the /etc/resolv.conf file to see if it's been changed, and if so,
re-reads it. I assume it's actually reading it instead of relying on libresolv,
as wouldn't the latter "just work"?

This has been annoying me ever since I started using Mozilla - sorry for not
reporting it sooner. I'm really surprised no-one else has (I searched the bugs
for "resolv.conf" and "name resolution" - Zaro Boogs...)
Go offline and online to force a reload (at least on linux)

This isn't a mozilla issue; glibc caches the resolv.conf file.

Also see bug 166479

*** This bug has been marked as a duplicate of 64857 ***
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE

Comment 2

15 years ago
Mozilla doesn't read /etc/resolv.conf, it's the resolver-library that does that
(part of the OS). The cause for your problem is that Mozilla caches DNS-address,
to avoid a security bug, that that brings other bugs. See bug 162871, bug 151929
and bug 168566. The big problem is that you don't what DNS-data is right, and
what is false.

Workaround : click twice on the online/offline icon at the bottom right. That
should clean the DNS-cache. The rest is up to the OS.
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.