Reconcile AllowedIPs from the routes of the interface instead of replaying route events

This commit is contained in:
2026-10-20 23:28:49 +00:00
parent 925d266ab4
commit c7b16dd275
20 changed files with 2424 additions and 1191 deletions
+25
View File
@@ -0,0 +1,25 @@
package main
import (
"testing"
"time"
)
func TestBackoff(t *testing.T) {
var b backoff
var got []time.Duration
for range 8 {
got = append(got, b.next())
}
want := []time.Duration{1, 2, 4, 8, 16, 30, 30, 30}
for i := range want {
if got[i] != want[i]*time.Second {
t.Fatalf("step %d: got %s, want %s", i, got[i], want[i]*time.Second)
}
}
b.reset()
if d := b.next(); d != minBackoff {
t.Errorf("after reset: got %s, want %s", d, minBackoff)
}
}