-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync DNS Resolver Nameserver List #450
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fatanugraha The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
d8ee81b
to
a5c7dc6
Compare
// Ensure that the target that we're watching is not a symlink as we won't get any events when we're watching | ||
// a symlink. | ||
fileRealPath, err := filepath.EvalSymlinks(fw.path) | ||
if err != nil { | ||
return fmt.Errorf("adding watcher failed: %s", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upon testing i found out that the current hot-reload functionality of /etc/hosts
are not working in mac because /etc
is a symlink to /private/etc
.
When we're watching /etc
we won't get any events whenever /private/etc
has changed.
if err != nil { | ||
return []string{}, err | ||
} | ||
var hosts = make([]string, len(conf.Servers)) | ||
hosts := make([]string, 0, len(conf.Servers)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this subtle bug caused the first few entries of nameservers
to be empty string.
Signed-off-by: Fata Nugraha <[email protected]>
Signed-off-by: Fata Nugraha <[email protected]>
Signed-off-by: Fata Nugraha <[email protected]>
Signed-off-by: Fata Nugraha <[email protected]>
Signed-off-by: Fata Nugraha <[email protected]>
Signed-off-by: Fata Nugraha <[email protected]>
Signed-off-by: Fata Nugraha <[email protected]>
gvisor-tap-vsock only reads the
/etc/resolv.conf
during init time and does not subscribe into the changes that is made on that file. That is fine, but if i start gvisor-tap-vsock before I connected to my work VPN (which modifies /etc/resolv.conf) after I connected to the VPN i will no longer be able to resolve any DNS queries made from my VM because the original IP that gvisor-tap-vsock is using is no longer reachable once I connected to my work VPN.gvisor-tap-vsock log:
In this PR, I added functionality to ensure that the nameservers that we use to resolve DNS queries are up-to-date with the content of the
/etc/resolv.conf