diff --git a/internal/plugin/plugin.go b/internal/plugin/plugin.go index b6e58df..13c8d05 100644 --- a/internal/plugin/plugin.go +++ b/internal/plugin/plugin.go @@ -95,7 +95,7 @@ func NewPREF64(prefix netip.Prefix, maxInterval time.Duration) *PREF64 { // See https://datatracker.ietf.org/doc/html/rfc8781#section-4.1-2 lifetime := maxPref64Lifetime if int(maxInterval.Seconds())*3 < int(lifetime.Seconds()) { - lifetimeSeconds := int(maxInterval.Seconds()) + lifetimeSeconds := int(maxInterval.Seconds()) * 3 if r := int(lifetimeSeconds) % 8; r > 0 { lifetimeSeconds += 8 - r } diff --git a/internal/plugin/plugin_test.go b/internal/plugin/plugin_test.go index 6b6c326..686af79 100644 --- a/internal/plugin/plugin_test.go +++ b/internal/plugin/plugin_test.go @@ -856,7 +856,7 @@ func TestNewPREF64(t *testing.T) { want: &PREF64{ Inner: &ndp.PREF64{ Prefix: simplePrefix, - Lifetime: time.Minute * 10, + Lifetime: time.Minute * 30, }, }, }, @@ -889,7 +889,7 @@ func TestNewPREF64(t *testing.T) { want: &PREF64{ Inner: &ndp.PREF64{ Prefix: simplePrefix, - Lifetime: time.Second * 16, + Lifetime: time.Second * 32, }, }, },