mirror of
https://github.com/goodhosts/hostsfile.git
synced 2026-04-27 15:35:50 +03:00
[GH-ISSUE #33] Bug: Adding a host can add duplicates with differing IPs #10
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hostsfile#10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tomjn on GitHub (Jan 11, 2022).
Original GitHub issue: https://github.com/goodhosts/hostsfile/issues/33
This situation is not handled:
If I add a hostname
example.comwith1.1.1.1, then try to add the same hostname with2.2.2.2the result is that I now have 2 entries forexample.comfor both IPs. I expected a single entry for2.2.2.2.When adding a host, old entries should be removed.
This has recently caught us out over at VVV with the vagrant plugin usage when a VirtualBox restriction forced us to change the IP we use. Users who upgraded without halting their VMs kept the hosts file entry, and when they reprovisioned a second entry was added with the new IP. As a result requests to our domains were sent to the old IP, and destroying/halting the VM only triggered the new entry to be removed, the old entry being preserved and persisting the issue.