Skip to content
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

Allocate tun network device with name "ziti0" #650

Merged
merged 1 commit into from
May 24, 2023

Conversation

tomc797
Copy link
Contributor

@tomc797 tomc797 commented May 6, 2023

Allocate a tun network device with name ziti0.

When allocating a device, ifr.ifr_name accepts a format string with the %d specifier. The OS then will allocate a device with the generated name. The field ifr.ifr_name is overwritten with name and returned to the user.

@tomc797 tomc797 requested a review from a team as a code owner May 6, 2023 07:01
Distinguish the tun ifname from other tun devices.

Signed-off-by: Tom Carroll <[email protected]>
Copy link
Member

@scareything scareything left a comment

Choose a reason for hiding this comment

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

Thanks again for your contributions! I knew that we could set the tun device name but I didn't know you could use a format spec to let the name include the interface index. Nice trick!

@scareything
Copy link
Member

Note: we'll increment the minor version when this is merged, incase anyone has scripts, etc that are sensitive to the tun name.

@scareything scareything merged commit 065f12a into openziti:main May 24, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants