mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-12 01:23:56 +09:00
mapper: reconcile self on policy recomputes
Self renders from the same state as peers, so leaving it out of policy responses hid an exit node's approved routes until it reconnected. Fixes #3502
This commit is contained in:
1 parent
ba413fca3d
commit
ea6b0bf0b7
7 files changed
+259
-34
No files matched your search
@@ -1693,6 +1693,11 @@ func TestEnablingExitRoutes(t *testing.T) {
|
||||
assert.Contains(c, peerStatus.AllowedIPs.AsSlice(), tsaddr.AllIPv6())
|
||||
}
|
||||
}
|
||||
|
||||
// The approved node must learn its own routes on its live
|
||||
// session, not only after reconnecting (issue #3502).
|
||||
assert.True(c, status.Self.ExitNodeOption,
|
||||
"%s should offer itself as exit node", client.Hostname())
|
||||
}
|
||||
}, integrationutil.ScaledTimeout(10*time.Second), integrationutil.SlowPoll, "clients should see new routes")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user