Hello,

Can someone take a look at this? It's a pretty simple patch but a patch
nonetheless, so it'd be great if this was fixed upstream.

Best,
James

On 2020-08-16 1:58 p.m., James Lu wrote:
> Hi all,
> 
> When testing Babel with Bird 2.0.7, I noticed that unlike OSPF, Babel
> metrics are not read as an IGP metric for BGP purposes. I've attached a
> simple patch that adds this support - it seems to do the trick in my
> local testing.
> 
> Best,
> James
> 
>From 24d5eaf371437b99f331f3d660d462f8ce996596 Mon Sep 17 00:00:00 2001
From: James Lu <[email protected]>
Date: Sun, 16 Aug 2020 13:24:46 -0700
Subject: [PATCH] Nest: Read Babel metric as IGP metric

---
 nest/rt-table.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/nest/rt-table.c b/nest/rt-table.c
index eff25e5c..504deece 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -2873,6 +2873,13 @@ rt_get_igp_metric(rte *rt)
   }
 #endif
 
+#ifdef CONFIG_BABEL
+  if (a->source == RTS_BABEL)
+  {
+    return rt->u.babel.metric;
+  }
+#endif
+
   if (a->source == RTS_DEVICE)
     return 0;
 

Reply via email to