Skip to content

Conversation

JackDoan
Copy link
Collaborator

@JackDoan JackDoan commented Oct 2, 2025

This allows you to end your tun.dev name setting with %d to tell Nebula "please find the lowest-numbered interface that matches this pattern and use it"

I'm honestly not sure what would be needed to bring this to other platforms. I think Mac OS mostly doesn't care. Windows seems like it will need different handling as well, but won't break with this change.

Copy link
Collaborator

@jasikpark jasikpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks reasonable to me

}
if good {
if len(candidateName) > 16 {
return "", errors.New("you have too many nebula networks")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice to be a little bit more clear about exactly what's going on here in order to make this error actionable. It's actually OK to have this many nebula networks, but we can't fit the tun name.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also be a pre-flight check and should be included the example config comments/docs. Can't compute a name shorter than unix.IFNAMSIZ if the tunNameTemplate is longer than it to begin with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants