summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2011-05-05 14:14:20 +0200
committerOndrej Filip <feela@network.cz>2011-05-05 14:14:20 +0200
commitb7c48981069f25c01c552519e10aec4ebab1f031 (patch)
tree658f37a24a210c7e4fba0df88ed20815e48a19e1 /nest
parent409e8a6e21d3df0919fd2e131ba9a58222baee50 (diff)
Compilation was failing without OSPF or RIP protocol - FIXED.
Diffstat (limited to 'nest')
-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 3013b0f7..b37efef9 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))