diff --git a/pkg/kernel/tools/heal/liveness_check.go b/pkg/kernel/tools/heal/liveness_check.go index ed2eaeec..e8b796fe 100644 --- a/pkg/kernel/tools/heal/liveness_check.go +++ b/pkg/kernel/tools/heal/liveness_check.go @@ -36,8 +36,9 @@ const ( // NewKernelLivenessCheck is an implementation of heal.LivenessCheck. It sends ICMP // ping and checks reply. Returns false if didn't get reply. func NewKernelLivenessCheck(deadlineCtx context.Context, conn *networkservice.Connection) bool { - if mechanism := kernel.ToMechanism(conn.GetMechanism()); mechanism == nil { - log.FromContext(deadlineCtx).Errorf("Ping failed: wrong mechanism type") + if mechanism := conn.GetMechanism().GetType(); mechanism != kernel.MECHANISM { + log.FromContext(deadlineCtx).Errorf("ping is not supported for mechanism %v", mechanism) + return true } p := fastping.NewPinger()