[packages] quagga: Fix installing of OLSR host routes
git-svn-id: svn+ssh://svn.openwrt.org/openwrt@27913 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
37251eb7f4
commit
466ba0d2d1
1 changed files with 51 additions and 1 deletions
|
@ -637,7 +637,45 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Vector for routing table. */
|
/* 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_ISIS] = 2,
|
||||||
[ZEBRA_ROUTE_BGP] = 3,
|
[ZEBRA_ROUTE_BGP] = 3,
|
||||||
[ZEBRA_ROUTE_HSLS] = 4,
|
[ZEBRA_ROUTE_HSLS] = 4,
|
||||||
|
@ -843,3 +881,15 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vty_out (vty, "Unknown route type%s", VTY_NEWLINE);
|
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);
|
||||||
|
|
Loading…
Reference in a new issue