Repository navigation
Conversation
Updates #1552 Signed-off-by: Lee Briggs <[email protected]>
Pull Request Revisions
✅ AI review completed for r3 HelpReact with emojis to give feedback on AI-generated reviews:
We'd love to hear from you—reach out anytime at [email protected]. |
|
Forgive me @bradfitz I'm trying to see if I can help a customer with my awful code |
|
I think we should do craciunoiuc@599e84f at the same time. |
|
Can we make it so it's not a |
Updates #1552 Signed-off-by: Lee Briggs <[email protected]>
| // suppressInterfaces is a debug knob containing a list of interface names that should not be advertised as endpoints. | ||
| // Traffic may still flow over these interfaces if system routing makes the decision to do so. | ||
| var excludeInterfaces = envknob.RegisterString("TS_DEBUG_EXCLUDE_INTERFACES") |
There was a problem hiding this comment.
There's a mismatch between the comment on line 30 which mentions 'suppressInterfaces' and the variable name 'excludeInterfaces' on line 32. Ensure comment and variable names are consistent.
| func isExcludedInterface(nif *net.Interface) bool { | ||
| if nif == nil { | ||
| return false | ||
| } | ||
|
|
||
| remain := excludeInterfaces() | ||
| for remain != "" { | ||
| var candidate string | ||
| candidate, remain, _ = strings.Cut(remain, ",") | ||
| if strings.TrimSpace(candidate) == nif.Name { | ||
| return true | ||
| } | ||
| } | ||
| return false | ||
| } |
There was a problem hiding this comment.
Consider adding a test for the isExcludedInterface function to ensure it correctly parses interface names from the environment variable.
Signed-off-by: Lee Briggs <[email protected]>
|
The other thing to look into with this is that the use case we ran into is (I can get you the support ticket number if you want more details) on Macs where unlike Linux + NetworkManager the Mac Tailscale client would bind to the existing wifi or wired connection instead of using whatever the default route is (an OpenVPN tunnel, in this case). We need Mac users to be able to explicitly say "Tailscale, use |
Updates #1552
Signed-off-by: Lee Briggs [email protected]