};
\f
/* Vector for routing table. */
-@@ -1229,6 +1232,8 @@ static const u_char meta_queue_map[ZEBRA
+@@ -374,6 +377,18 @@ nexthop_active_ipv4 (struct rib *rib, st
+
+ return 1;
+ }
++ else if (match->type == ZEBRA_ROUTE_OLSR)
++ {
++ for (newhop = match->nexthop; newhop; newhop = newhop->next)
++ if (CHECK_FLAG (newhop->flags, NEXTHOP_FLAG_FIB)
++ && newhop->type == NEXTHOP_TYPE_IFINDEX)
++ {
++ if (nexthop->type == NEXTHOP_TYPE_IPV4)
++ nexthop->ifindex = newhop->ifindex;
++ return 1;
++ }
++ return 0;
++ }
+ else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL))
+ {
+ for (newhop = match->nexthop; newhop; newhop = newhop->next)
+@@ -476,6 +491,18 @@ nexthop_active_ipv6 (struct rib *rib, st
+
+ return 1;
+ }
++ else if (match->type == ZEBRA_ROUTE_OLSR)
++ {
++ for (newhop = match->nexthop; newhop; newhop = newhop->next)
++ if (CHECK_FLAG (newhop->flags, NEXTHOP_FLAG_FIB)
++ && newhop->type == NEXTHOP_TYPE_IFINDEX)
++ {
++ if (nexthop->type == NEXTHOP_TYPE_IPV6)
++ nexthop->ifindex = newhop->ifindex;
++ return 1;
++ }
++ return 0;
++ }
+ else if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_INTERNAL))
+ {
+ for (newhop = match->nexthop; newhop; newhop = newhop->next)
+@@ -1229,6 +1256,8 @@ static const u_char meta_queue_map[ZEBRA
[ZEBRA_ROUTE_ISIS] = 2,
[ZEBRA_ROUTE_BGP] = 3,
[ZEBRA_ROUTE_HSLS] = 4,
else
{
vty_out (vty, "Unknown route type%s", VTY_NEWLINE);
+--- a/zebra/rt_netlink.c
++++ b/zebra/rt_netlink.c
+@@ -1488,6 +1488,9 @@ netlink_route_multipath (int cmd, struct
+ addattr_l (&req.n, sizeof req, RTA_PREFSRC,
+ &nexthop->src.ipv4, bytelen);
+
++ if (rib->type == ZEBRA_ROUTE_OLSR)
++ req.r.rtm_scope = RT_SCOPE_LINK;
++
+ if (IS_ZEBRA_DEBUG_KERNEL)
+ zlog_debug("netlink_route_multipath() (single hop): "
+ "nexthop via if %u", nexthop->ifindex);