diff options
| author | Mark Stapp <mjs.ietf@gmail.com> | 2025-03-21 11:30:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-21 11:30:16 -0400 |
| commit | 556d3c445d63ffc62e35f2d7b2b41ef5df9906d7 (patch) | |
| tree | 4f1e21d2825e917df68430f0ce8f8f85dae252c9 /lib/zclient.c | |
| parent | 797e0512224f039de54a7d64f73947ff26be9527 (diff) | |
| parent | 860c1e445043c6e380a9fb08cc0c21c6339625ad (diff) | |
Merge pull request #18359 from soumyar-roy/soumya/streamsize
zebra: zebra crash for zapi stream
Diffstat (limited to 'lib/zclient.c')
| -rw-r--r-- | lib/zclient.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index bdb62befb9..3e68e962aa 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -1326,24 +1326,6 @@ enum zclient_send_status zclient_nhg_send(struct zclient *zclient, int cmd, return zclient_send_message(zclient); } -/* size needed by a stream for redistributing a route */ -int zapi_redistribute_stream_size(struct zapi_route *api) -{ - size_t msg_size = 0; - size_t nh_size = sizeof(struct zapi_nexthop); - - msg_size = sizeof(struct zapi_route); - /* remove unused nexthop structures */ - msg_size -= (MULTIPATH_NUM - api->nexthop_num) * nh_size; - /* remove unused backup nexthop structures */ - msg_size -= (MULTIPATH_NUM - api->backup_nexthop_num) * nh_size; - /* remove unused opaque values */ - msg_size -= ZAPI_MESSAGE_OPAQUE_LENGTH - api->opaque.length; - - return msg_size; -} - - int zapi_route_encode(uint8_t cmd, struct stream *s, struct zapi_route *api) { struct zapi_nexthop *api_nh; |
