backend: fix Peer persistent keepalive
Right now, the persistent keepalive field of the Peer CRD is always interpretted as nanoseconds and not seconds. This causes a mismatch between Kilo's expected behavior and the actual interval that is given to Peers. Because the interval is interpretted as nanoseconds the value rounds down to 0 seconds. Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
This commit is contained in:
@@ -511,7 +511,7 @@ func TestTranslatePeer(t *testing.T) {
|
||||
{
|
||||
name: "valid keepalive",
|
||||
spec: v1alpha1.PeerSpec{
|
||||
PersistentKeepalive: 1 * int(time.Second),
|
||||
PersistentKeepalive: 1,
|
||||
},
|
||||
out: &mesh.Peer{
|
||||
Peer: wireguard.Peer{
|
||||
|
Reference in New Issue
Block a user