wgengine/router{,/osrouter}: split OS router implementations into subpackage

So wgengine/router is just the docs + entrypoint + types, and then
underscore importing wgengine/router/osrouter registers the constructors
with the wgengine/router package.

Then tsnet can not pull those in.

Updates #17313

Change-Id: If313226f6987d709ea9193c8f16a909326ceefe7
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2025-09-27 15:18:25 -07:00
committed by Brad Fitzpatrick
parent 65d6c80695
commit 39e35379d4
29 changed files with 208 additions and 207 deletions
+1 -2
View File
@@ -4,7 +4,6 @@
package router
import (
"log"
"net/netip"
"testing"
@@ -56,7 +55,7 @@ func TestConsolidateRoutes(t *testing.T) {
},
}
cr := &consolidatingRouter{logf: log.Printf}
cr := &consolidatingRouter{logf: t.Logf}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
got := cr.consolidateRoutes(test.cfg)