From ae01592043d5f2605ab286e0f6070ccdfd40a021 Mon Sep 17 00:00:00 2001 From: Lee Smet Date: Tue, 21 Nov 2023 13:29:35 +0100 Subject: [PATCH] Allow selection of infinite metric routes This fixes an issue where a selected route with infinite metric was considered lost every time an update for that subnet came in, potentially causing an update storm. Signed-off-by: Lee Smet --- src/source_table.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/source_table.rs b/src/source_table.rs index e4e5dfe..eaf4269 100644 --- a/src/source_table.rs +++ b/src/source_table.rs @@ -127,6 +127,7 @@ impl SourceTable { Some(fd) => { (route.seqno().gt(&fd.seqno)) || (route.seqno() == fd.seqno && route.metric() < fd.metric) + || route.metric().is_infinite() } None => true, }