From d44ca835fc8000889a92b98af5a22b8139b2a3b7 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 16 Nov 2015 12:48:07 -0800 Subject: Zebra: Remove reliance on NEXTHOP_TYPE_IPV4_ONLINK Zebra already knows if an interface is unnumbered or not. This is communicated to OSPF. OSPF would only send a NEXTHOP_TYPE_IPV4_ONLINK *if* the path was unnumbered, which it learns from Zebra. As such, Have OSPF use the normal NEXTHOP_TYPE_IPV4_IFINDEX type for unnumbered paths. In Zebra, if the ifindex recieved is unnumbered then assume that the link is NEXTHOP_FLAG_ONLINK. Ticket: CM-8145 Reviewed-by: CCR-3771 Testing: See bug Signed-off-by: Donald Sharp --- lib/zclient.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'lib/zclient.c') diff --git a/lib/zclient.c b/lib/zclient.c index f1486f4ad..512abc24d 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -611,23 +611,7 @@ zapi_ipv4_route (u_char cmd, struct zclient *zclient, struct prefix_ipv4 *p, stream_write (s, (u_char *) & p->prefix, psize); /* Nexthop, ifindex, distance and metric information. */ - /* ZAPI_MESSAGE_ONLINK implies interleaving */ - if (CHECK_FLAG (api->message, ZAPI_MESSAGE_ONLINK)) - { - /* ZAPI_MESSAGE_NEXTHOP is required for proper receiving */ - assert (CHECK_FLAG (api->message, ZAPI_MESSAGE_NEXTHOP)); - /* 64-bit data units, interleaved between nexthop[] and ifindex[] */ - assert (api->nexthop_num == api->ifindex_num); - stream_putc (s, api->nexthop_num * 2); - for (i = 0; i < api->nexthop_num; i++) - { - stream_putc (s, ZEBRA_NEXTHOP_IPV4_ONLINK); - stream_put_in_addr (s, api->nexthop[i]); - stream_putc (s, ZEBRA_NEXTHOP_IFINDEX); - stream_putl (s, api->ifindex[i]); - } - } - else if (CHECK_FLAG (api->message, ZAPI_MESSAGE_NEXTHOP)) + if (CHECK_FLAG (api->message, ZAPI_MESSAGE_NEXTHOP)) { /* traditional 32-bit data units */ if (CHECK_FLAG (api->flags, ZEBRA_FLAG_BLACKHOLE)) -- cgit v1.2.3