summaryrefslogtreecommitdiffstats
path: root/lib/zclient.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-11-16 21:48:07 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2015-11-16 21:48:07 +0100
commitd44ca835fc8000889a92b98af5a22b8139b2a3b7 (patch)
tree712e5a01505fb20505cb0a5d5fad10077a73cdb6 /lib/zclient.c
parentBGP: Fix nexthop registration churn (diff)
downloadfrr-d44ca835fc8000889a92b98af5a22b8139b2a3b7.tar.xz
frr-d44ca835fc8000889a92b98af5a22b8139b2a3b7.zip
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 <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c18
1 files changed, 1 insertions, 17 deletions
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))