summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-05-06 22:09:44 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2011-05-06 22:09:44 +0200
commit46bb7e0d176a4dc0a47bb406988f92fb29cceaf4 (patch)
tree2fd3981bf41476d8e694fff6c947860d6b88ce64
parentb8cc390e7ed724a9ad605453227d1e4686f3a11b (diff)
parentb7c48981069f25c01c552519e10aec4ebab1f031 (diff)
downloadbird-46bb7e0d176a4dc0a47bb406988f92fb29cceaf4.tar
bird-46bb7e0d176a4dc0a47bb406988f92fb29cceaf4.zip
Merge commit 'origin/master'
-rw-r--r--nest/rt-table.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 3013b0f..b37efef 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -1486,13 +1486,18 @@ rt_get_igp_metric(rte *rt)
return ea->u.data;
rta *a = rt->attrs;
+
+#ifdef CONFIG_OSPF
if ((a->source == RTS_OSPF) ||
(a->source == RTS_OSPF_IA) ||
(a->source == RTS_OSPF_EXT1))
return rt->u.ospf.metric1;
+#endif
+#ifdef CONFIG_RIP
if (a->source == RTS_RIP)
return rt->u.rip.metric;
+#endif
/* Device routes */
if ((a->dest != RTD_ROUTER) && (a->dest != RTD_MULTIPATH))