Skip to content

Add OpenBSD support#36

Merged
danderson merged 2 commits intotailscale:masterfrom
martinbaillie:openbsd
Feb 12, 2020
Merged

Add OpenBSD support#36
danderson merged 2 commits intotailscale:masterfrom
martinbaillie:openbsd

Conversation

@martinbaillie
Copy link
Contributor

This contains early but working support for OpenBSD:
Screen Shot 2020-02-12 at 6 22 00 pm
I was also able to connect an IRC client to the IRC party line 🎉

I'd welcome early guidance on how you would the PR to evolve. I littered the code with TODOs as the thoughts came to me. There's also a lot of potential re-use between it and the Linux router.

Martin Baillie added 2 commits February 12, 2020 18:08
Signed-off-by: Martin Baillie <martin@baillie.email>
OpenBSD tunnel names are prefixed with `tun`.

Controlling the port allows for deterministic configuration of firewall
rules (using `pf` in this case).

Signed-off-by: Martin Baillie <martin@baillie.email>
Copy link
Member

@danderson danderson left a comment

Choose a reason for hiding this comment

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

Looks excellent, thank you!

We should add non-linux builds to the CI, at least go build to make sure it still compiles. I'll file a bug for that.

Copy link
Member

@danderson danderson left a comment

Choose a reason for hiding this comment

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

A couple of suggestions, but I'd say we can merge this soon and continue to iterate from there.

@danderson
Copy link
Member

My thoughts on reuse: leave the duplication for now. There's a chance we'll switch Linux to using Netlink directly for configuration. At this stage of tailscale's life, I think it's better to keep the OS implementations relatively separate until they've all matured a bit more. Worst case if I'm wrong, it's easy to refactor later.

@crawshaw
Copy link
Contributor

Leaving for @danderson to review.

@danderson
Copy link
Member

Per discussion with @martinbaillie on hello.ipn.dev IRC, I'm going to merge this on the "merge early, merge often" principle. I'll do a followup myself to remove one of the TODOs and fix the logf thing @bradfitz pointed out, but the rest of the todos is up to Martin. I figure that "some openbsd support" is better than "zero openbsd support", and people building for openbsd will understand the WIP nature :)

@danderson danderson marked this pull request as ready for review February 12, 2020 23:57
@danderson danderson merged commit 3d5ef74 into tailscale:master Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants