Closed Bug 166745 Opened 22 years ago Closed 20 years ago

Problems finding host when switching networks. Cached DNS values should be flushed when host not found.

Categories

(MailNews Core :: Networking, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 162871

People

(Reporter: leif, Assigned: mscott)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.0.1) Gecko/20020823 Netscape/7.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.0.1) Gecko/20020823 Netscape/7.0

I frequently move my notebook between work and home.  My mail server is located
at home and is visible on that network as a 192.168.1.x address.   From work,
the same  mail server is visible as a global IP address.
When moving between networks, each network provides its own DNS server when the
notbook registers via DHCP.
The problem is that when I start mozilla at home and get mail.  It will lookup
the host mail.mydomain.com and connects fine.
If I then suspend my machine, take it to work, and attempt to get mail, I will
get a host not found error.  It appears that Mozilla is caching the IP address
of the mail host as 192.168.1.x rather than looking it up again.   If I wait for
a while or restart mozilla, then things will work fine...  Until I take the
machine home.  Then I have the same problem in reverse.

One option would be to make the cache timeouts include the time that the machine
was suspended.  It is always suspended for at least an hour in these cases.  
But a better solution may be to have the cache get flushed if the machines IP
address changes or if the cached IP address can not be located.

Thanks in advance.

Reproducible: Always

Steps to Reproduce:
1. see details.
2.
3.
I think it would be best to mark this a DUPLICATE of Bug 162871, as the issue is
essentially the same and the fix probably would be also.  There are known issues
and several open bugs (151683, 86942) that the DNS service does not cope well
with switching networks/going online/offline.  

This bug ought also be assigned to Browser/Networking as it has implications
beyond just MailNews and that component is the more-general.
Same trouble on FreeBSD 4.7-Stable ( CVS update 26 october) and Mozilla until
1.2a (not yet tested on 1.2b).

If Mozilla is running and I change the DNS server, there is no DNS resolution.
Changing the DNS servers occurs with VPNs too...
If I kill Mozilla and relauch it it is OK but it is not really the right way.

My version:
 Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021019
 port mozilla-1.1_2,1
QA Contact: huang → gchan
They should be flushed every minute.

Even when there's no error RESOLVING a domain, it could still be wrong, as with
xchat.org on my ISP.

I have to start using another browser until mozilla finds it practical to delete
the DNS cache.
I was debating whether to add a comment to this bug or open a new one, since
this seems to be related to a *change* in the IMAP server's IP address, whereas
I can see the same behavior even when the server resolves to the same IP
address. Hey, even when I'm on the same subnet. 

Steps to reproduce: 

1. Open Mozilla while on IP address A- connect to IMAP, everything works fine
2. Disconnect from IP address A
3. Connect to IP address B (verified both from the same and different subnets)
4. the server is at the same IP address
5. Mail hangs until restarted (needs kill -9) or reconnected to the original IP
address

Note: reproduces in both directions  

*** This bug has been marked as a duplicate of 162871 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.