Debug and Patch Tailscale TUN Support on NetBSD (amd64)

I’d like someone to investigate and attempt to resolve the issue with tailscale tun networking on NetBSD.
There is an existing pkgsrc tailscale client, which runs under NetBSD but only with userspace-networking, not full tun networking. It will start up, connect to the tailnet and allow listing hosts, plus make connections but only across userspace-networking.
Target platform is NetBSD/amd64. Ideally NetBSD-11 (from https://releng.netbsd.org/), but happy if it can be made to work on NetBSD-current.
Target tailscale version would be “latest tailscale version at start of project”, though happy for that to adjust to a nearby version as needed.
Target golang version would be 1.25, though again happy for a working result on a nearby version
I would propose two milestones:

  1. Attempt to diagnose and resolve the issue. Provide details on investigation had been done and what changes had been attempted
  2. Patch for working tun networking tailscale on NetBSD (either a patch to the existing pkgsrc package, or to standalone tailscale code)
    Working tailscale would also unlock the first milestone, so no need to provide details of what was tried in that case. First milestone is a fallback to provide some payment if attempt is unsuccessful.
    This is a repost of a previous “Package Tailscale Client for NetBSD” project which did not have correctly stated goals.
    note - there is also a pkgsrc wireguard-go package which has working tun networking on NetBSD, which may prove useful for reference

https://codeload.github.com/ryoon/tailscale/tar.gz/1534583f2484f75450dd73f67949f61f26dbf340

"

I think you should start with that source, as it includes the patches to build and install the tailscale & tailscaled binries on NetBSDSorry if I was unclear before

Help me!!!

Hello,

As you noted, the current pkgsrc (or pkgsrc-wip) implementation relies on userspace-networking (netstack). While this allows the client to verve card info connect and list hosts, it does not create a kernel-level tun interface.