[quagga-dev 4364] Re: Ospf6d redistribution BUG

emmanuel.vize emmanuel.vize at 6wind.com
Tue Sep 19 16:19:51 BST 2006


Hi Phillip,

I believe you are right.
This is a bug we have detected some times ago and we have performed 
exactly the same fix (but could not commit it so far :-(  )

Regards,
Emmanuel.


Spagnolo, Phillip A wrote:

>All,
>In quagga-0.98.6, there is a bug when setting an external LSA to type-2
>or setting the metric when using route-maps.
>
>Ospf6d assumes the return value of route_map_apply should be RMAP_MATCH.
>However, when setting a metric then the return value will be RMAP_OKAY.
>See the function ospf6_routemap_rule_set_metric() below.
>
>Let me know if I am missing something.
>
>Thanks,
>Phil
>
>
>In ospf6_asbr_redistribute_add(), the following change should be made.
>It is labeled with BUGFIX.
>
>  /* apply route-map */
>  if (ospf6->rmap[type].map)
>    {
>      memset (&troute, 0, sizeof (troute));
>      memset (&tinfo, 0, sizeof (tinfo));
>      troute.route_option = &tinfo;
>
>      ret = route_map_apply (ospf6->rmap[type].map, prefix,
>                             RMAP_OSPF6, &troute);
>#ifdef BUGFIX
>      if (!(ret == RMAP_MATCH || ret == RMAP_OKAY))
>#else
>      if (ret != RMAP_MATCH)
>#endif //BUGFIX
>
>
>
>route_map_result_t
>ospf6_routemap_rule_set_metric (void *rule, struct prefix *prefix,
>                                route_map_object_t type, void *object)
>{
>  char *metric = (char *) rule;
>  struct ospf6_route *route = (struct ospf6_route *) object;
>
>zlog_debug("test ospf6_routemap_rule_set_metric");
>
>  if (type != RMAP_OSPF6)
>    return RMAP_OKAY;
>
>  route->path.cost = atoi (metric);
>  return RMAP_OKAY;
>}
>
>_______________________________________________
>Quagga-dev mailing list
>Quagga-dev at lists.quagga.net
>http://lists.quagga.net/mailman/listinfo/quagga-dev
>
>
>
>  
>






More information about the Quagga-dev mailing list