diff options
Diffstat (limited to 'lib/zclient.c')
-rw-r--r-- | lib/zclient.c | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index 5e371546..bb7747fa 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -318,23 +318,23 @@ zapi_ipv4_add (struct zclient *zclient, struct prefix_ipv4 *p, if (CHECK_FLAG (api->message, ZAPI_MESSAGE_NEXTHOP)) { if (CHECK_FLAG (api->flags, ZEBRA_FLAG_BLACKHOLE)) - { - stream_putc (s, 1); - stream_putc (s, ZEBRA_NEXTHOP_BLACKHOLE); - } + { + stream_putc (s, 1); + stream_putc (s, ZEBRA_NEXTHOP_BLACKHOLE); + } else - stream_putc (s, api->nexthop_num + api->ifindex_num); - + stream_putc (s, api->nexthop_num + api->ifindex_num); + for (i = 0; i < api->nexthop_num; i++) - { - stream_putc (s, ZEBRA_NEXTHOP_IPV4); - stream_put_in_addr (s, api->nexthop[i]); - } + { + stream_putc (s, ZEBRA_NEXTHOP_IPV4); + stream_put_in_addr (s, api->nexthop[i]); + } for (i = 0; i < api->ifindex_num; i++) - { - stream_putc (s, ZEBRA_NEXTHOP_IFINDEX); - stream_putl (s, api->ifindex[i]); - } + { + stream_putc (s, ZEBRA_NEXTHOP_IFINDEX); + stream_putl (s, api->ifindex[i]); + } } if (CHECK_FLAG (api->message, ZAPI_MESSAGE_DISTANCE)) @@ -378,23 +378,23 @@ zapi_ipv4_delete (struct zclient *zclient, struct prefix_ipv4 *p, if (CHECK_FLAG (api->message, ZAPI_MESSAGE_NEXTHOP)) { if (CHECK_FLAG (api->flags, ZEBRA_FLAG_BLACKHOLE)) - { - stream_putc (s, 1); - stream_putc (s, ZEBRA_NEXTHOP_BLACKHOLE); - } + { + stream_putc (s, 1); + stream_putc (s, ZEBRA_NEXTHOP_BLACKHOLE); + } else - stream_putc (s, api->nexthop_num + api->ifindex_num); + stream_putc (s, api->nexthop_num + api->ifindex_num); for (i = 0; i < api->nexthop_num; i++) - { - stream_putc (s, ZEBRA_NEXTHOP_IPV4); - stream_put_in_addr (s, api->nexthop[i]); - } + { + stream_putc (s, ZEBRA_NEXTHOP_IPV4); + stream_put_in_addr (s, api->nexthop[i]); + } for (i = 0; i < api->ifindex_num; i++) - { - stream_putc (s, ZEBRA_NEXTHOP_IFINDEX); - stream_putl (s, api->ifindex[i]); - } + { + stream_putc (s, ZEBRA_NEXTHOP_IFINDEX); + stream_putl (s, api->ifindex[i]); + } } if (CHECK_FLAG (api->message, ZAPI_MESSAGE_DISTANCE)) @@ -564,6 +564,7 @@ zebra_interface_add_read (struct stream *s) ifp->ifindex = stream_getl (s); /* Read interface's value. */ + ifp->status = stream_getc (s); ifp->flags = stream_getl (s); ifp->metric = stream_getl (s); ifp->mtu = stream_getl (s); @@ -600,6 +601,7 @@ zebra_interface_state_read (struct stream *s) ifp->ifindex = stream_getl (s); /* Read interface's value. */ + ifp->status = stream_getc (s); ifp->flags = stream_getl (s); ifp->metric = stream_getl (s); ifp->mtu = stream_getl (s); |