Closed
Bug 200772
Opened 22 years ago
Closed 22 years ago
DNS: offline/online cycling should reload DNS cache (reload hosts file)
Categories
(Core :: Networking, enhancement)
Core
Networking
Tracking
()
VERIFIED
DUPLICATE
of bug 192798
People
(Reporter: mrmazda, Assigned: darin.moz)
Details
Build ID's 2003040120 OS/2; 2003040105 W32; 2003040105 Linux
Filed at the direction of timeless per IRC discussion.
To reproduce:
1-Add to hosts file "216.239.51.100 testcase.4..hosts.file"
2-Open browser
3-Enter "testcase.4..hosts.file" in the URL bar, thus loading Google
4-Go offline
5-Change previous hosts file entry IP from "216.239.51.100" to "207.200.81.215"
5-Go online
6-Reload
Actual results:
1-Google still displayed unless Mozilla is shut down & restarted
Expected results:
1-Mozilla.org displayed without shutting down Mozilla to reload hosts
Comment 1•22 years ago
|
||
This is already filed, iirc...
Summary: offline/online cycling should reload hosts file → offline/online cycling should reload DNS cache
Whiteboard: DUPEME
Comment 2•22 years ago
|
||
*** This bug has been marked as a duplicate of 192798 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 3•22 years ago
|
||
restoring "hosts" to summary so a search can find this keyword
v dupe
Status: RESOLVED → VERIFIED
Summary: offline/online cycling should reload DNS cache → offline/online cycling should reload DNS cache (reload hosts file)
Whiteboard: DUPEME
I didn't know that resinit() cached the hosts file... Does anyone know if this
is documented?
Can you tell me what happens if you add new entries to your hosts file w/o
restarting. These should take effect, as far as I can tell. If not, there would
be potentially yet another bug...
Reporter | ||
Comment 7•22 years ago
|
||
I'd like to see the hosts file stat'd on fetches so that hosts file changes
would take effect immediately. AFAICT, only shutting down Mozilla and restarting
causes hosts reload.
Comment 8•22 years ago
|
||
This is not a function of Mozilla. Mozilla knows nothing about the HOSTS file.
This is totally a function of TCP/IP.
The correct interaction here (absent a /etc/hosts caching resolver) is:
The DNS cache works by hostname.
So changing the IP of hostnames you have accessed in the past (regardless of the
actual IP address being in DNS -OR- hosts) by hacking /etc/hosts will not work,
because the hostname will hit an entry in DNS cache.
adding or changing /etc/hosts entries that have not ever been used in the
browser session should work.
Summary: offline/online cycling should reload DNS cache (reload hosts file) → DNS: offline/online cycling should reload DNS cache (reload hosts file)
Assignee | ||
Comment 10•22 years ago
|
||
mozilla should not know about /etc/hosts .. that is a detail of the operating
system's implementation of gethostbyname (and friends). mozilla cannot know for
sure that /etc/hosts will be consulted. it would have to check the
configuration of the system (e.g., under linux, only if /etc/host.conf includes
hosts). i don't think we want to go the route of checking for such things. it
is the job of glibc (in the case of linux).
Comment 11•22 years ago
|
||
Darin: in Windows (and thus probably OS/2 as well), hosts support is hard coded,
as I understand it. In UNIX, you can configure resolver to ignore /etc/hosts,
but this far, I can't recall any UNIX DNS bug reports where someone messed that up.
Felix:
can you test this w/ a daily build and see how it works? the other bug was
fixed, but then I had to reopen it. Any test results you have would be appreciated.
Reporter | ||
Comment 12•22 years ago
|
||
According to comment 0 procedure, this is broken in Mozilla/5.0 (OS/2; U; Warp
4.5; en-US; rv:1.4) Gecko/20030619
Comment 13•22 years ago
|
||
The hosts file is managed by TCP/IP. There is nothing the browser can do to
reload it.
DNS resolution is handled by TCP/IP.
You need to log in
before you can comment on or make changes to this bug.
Description
•