+2005-08-27 Hasso Tepper <hasso at quagga.net>
+
+ * ripng_zebra.c, ripngd.[ch]: Pass metric info to the zebra daemon.
+
2005-04-11 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ripng_zebra.c (ripng_redistribute_unset, ripng_redistribute_clean):
\f
void
ripng_zebra_ipv6_add (struct prefix_ipv6 *p, struct in6_addr *nexthop,
- unsigned int ifindex)
+ unsigned int ifindex, u_char metric)
{
struct zapi_ipv6 api;
SET_FLAG (api.message, ZAPI_MESSAGE_IFINDEX);
api.ifindex_num = 1;
api.ifindex = &ifindex;
-
+ SET_FLAG (api.message, ZAPI_MESSAGE_METRIC);
+ api.metric = metric;
+
zapi_ipv6_route (ZEBRA_IPV6_ROUTE_ADD, zclient, p, &api);
}
}
rinfo->type = ZEBRA_ROUTE_RIPNG;
rinfo->sub_type = RIPNG_ROUTE_RTE;
- ripng_zebra_ipv6_add (&p, &rinfo->nexthop, rinfo->ifindex);
+ ripng_zebra_ipv6_add (&p, &rinfo->nexthop, rinfo->ifindex,
+ rinfo->metric);
rinfo->flags |= RIPNG_RTF_FIB;
/* Aggregate check. */
RIPNG_TIMER_OFF (rinfo->t_garbage_collect);
if (! IPV6_ADDR_SAME (&rinfo->nexthop, nexthop))
- IPV6_ADDR_COPY (&rinfo->nexthop, nexthop);
+ IPV6_ADDR_COPY (&rinfo->nexthop, nexthop);
- ripng_zebra_ipv6_add (&p, nexthop, ifp->ifindex);
+ ripng_zebra_ipv6_add (&p, nexthop, ifp->ifindex, rinfo->metric);
rinfo->flags |= RIPNG_RTF_FIB;
/* The aggregation counter needs to be updated because
if (oldmetric != RIPNG_METRIC_INFINITY)
{
ripng_zebra_ipv6_delete (&p, &rinfo->nexthop, rinfo->ifindex);
- ripng_zebra_ipv6_add (&p, nexthop, ifp->ifindex);
+ ripng_zebra_ipv6_add (&p, nexthop, ifp->ifindex, rinfo->metric);
rinfo->flags |= RIPNG_RTF_FIB;
if (! IPV6_ADDR_SAME (&rinfo->nexthop, nexthop))
void ripng_distribute_update_interface (struct interface *);
void ripng_if_rmap_update_interface (struct interface *);
-void ripng_zebra_ipv6_add (struct prefix_ipv6 *p, struct in6_addr *nexthop, unsigned int ifindex);
+void ripng_zebra_ipv6_add (struct prefix_ipv6 *p, struct in6_addr *nexthop, unsigned int ifindex, u_char metric);
void ripng_zebra_ipv6_delete (struct prefix_ipv6 *p, struct in6_addr *nexthop, unsigned int ifindex);
void ripng_redistribute_clean ();