-
Notifications
You must be signed in to change notification settings - Fork 4
feat: support OS DNS configurator & Router on darwin #87
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
base: main
Are you sure you want to change the base?
Conversation
func TailscaleULARange() netip.Prefix { | ||
tsUlaRange.Do(func() { mustPrefix(&tsUlaRange.v, "fd7a:115c:a1e0::/48") }) | ||
tsUlaRange.Do(func() { mustPrefix(&tsUlaRange.v, "fd60:627a:a42b::/48") }) | ||
return tsUlaRange.v | ||
} |
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 is to address:
tailscale/wgengine/router/router_userspace_bsd.go
Lines 143 to 151 in f14d20d
newRoutes := make(map[netip.Prefix]bool) | |
for _, route := range cfg.Routes { | |
if runtime.GOOS != "darwin" && route == tsaddr.TailscaleULARange() { | |
// Because we added the interface address as a /48 above, | |
// the kernel already created the Tailscale ULA route | |
// implicitly. We mustn't try to add/delete it ourselves. | |
continue | |
} | |
newRoutes[route] = true |
@@ -73,8 +73,10 @@ const ( | |||
CoderServiceIPv6String = "fd60:627a:a42b::53" | |||
) | |||
|
|||
// These are all unfortunately Coder IP ranges, not Tailscale IP ranges. |
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.
Dean suggested not renaming to minimize the diff.
@@ -1064,7 +1065,7 @@ func (de *endpoint) handleCallMeMaybe(m *disco.CallMeMaybe) { | |||
} | |||
var newEPs []netip.AddrPort | |||
for _, ep := range m.MyNumber { | |||
if ep.Addr().Is6() && ep.Addr().IsLinkLocalUnicast() { | |||
if (ep.Addr().Is6() && ep.Addr().IsLinkLocalUnicast()) || tsaddr.IsTailscaleIP(ep.Addr()) { |
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 is so we don't discover Coder tailnet IPs as peer endpoints.
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.
As we drop the network extension, we're going to start informing the OS of the magicDNS server by modifying /etc/resolvers
@@ -55,7 +55,7 @@ func (c *darwinConfigurator) SetDNS(cfg OSConfig) error { | |||
// Add a dummy file to /etc/resolver with a "search ..." directive if we have | |||
// search suffixes to add. | |||
if len(cfg.SearchDomains) > 0 { |
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.
We don't currently use search domains.
See self-review.