WIP: rebase fork onto upstream/main (v1.103.0) #15

Closed
codinget wants to merge 670 commits from webnet into save/webnet-2026-07-29
2 changed files with 6 additions and 0 deletions
Showing only changes of commit 1c0e833749 - Show all commits
+5
View File
@@ -1730,6 +1730,11 @@ var debugWhoIs = envknob.RegisterBool("TS_DEBUG_WHOIS")
// If ok == true, n and u are valid.
func (b *LocalBackend) WhoIs(proto string, ipp netip.AddrPort) (n tailcfg.NodeView, u tailcfg.UserProfile, ok bool) {
var zero tailcfg.NodeView
// Normalize IPv4-mapped IPv6 addresses (e.g. "::ffff:100.87.98.86") to
// their canonical IPv4 form so the lookup matches the node's IPv4 address.
ipp = netip.AddrPortFrom(ipp.Addr().Unmap(), ipp.Port())
b.mu.Lock()
defer b.mu.Unlock()
+1
View File
@@ -2904,6 +2904,7 @@ func TestWhoIs(t *testing.T) {
{"round1MyselfWithPort", "100.101.102.103:123", 1, "Myself", nil},
{"round1Peer2NoPort", "100.200.200.200:0", 2, "Peer2", []string{"group:foo"}},
{"round1Peer2WithPort", "100.200.200.200:123", 2, "Peer2", []string{"group:foo"}},
{"round1Peer2Mapped4in6", "[::ffff:100.200.200.200]:123", 2, "Peer2", []string{"group:foo"}},
{"round1UnknownPeer", "100.4.0.4:404", 0, "", nil},
}
expectWhois(t, testsRound1, b)