summaryrefslogtreecommitdiff
path: root/lib/zclient.c
diff options
context:
space:
mode:
authorMark Stapp <mjs.ietf@gmail.com>2025-03-11 14:03:14 -0400
committerGitHub <noreply@github.com>2025-03-11 14:03:14 -0400
commitd0cb3ad7cb3ce5ac25c159e43f2cb1ccde2e2e14 (patch)
treee1c744749d75ef96339fb04c15be9dcf829af3a3 /lib/zclient.c
parentb1711c010fbb016b982b1d7471ae62a44c00e93c (diff)
parentc50fe2104567358fd6ce5d9cbec624fa0490c1af (diff)
Merge pull request #16614 from louis-6wind/fix-otable-heap-after-free
zebra: fix table heap-after-free crash
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index f0476867be..bdb62befb9 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -1362,6 +1362,8 @@ int zapi_route_encode(uint8_t cmd, struct stream *s, struct zapi_route *api)
stream_putc(s, api->type);
stream_putw(s, api->instance);
+ if (CHECK_FLAG(api->message, ZAPI_MESSAGE_TABLEID))
+ SET_FLAG(api->flags, ZEBRA_FLAG_TABLEID);
stream_putl(s, api->flags);
stream_putl(s, api->message);
@@ -1421,6 +1423,8 @@ int zapi_route_encode(uint8_t cmd, struct stream *s, struct zapi_route *api)
return -1;
}
+ if (CHECK_FLAG(api->message, ZAPI_MESSAGE_TABLEID))
+ SET_FLAG(api->flags, ZEBRA_FLAG_TABLEID);
if (zapi_nexthop_encode(s, api_nh, api->flags,
api->message)
!= 0)
@@ -1460,6 +1464,9 @@ int zapi_route_encode(uint8_t cmd, struct stream *s, struct zapi_route *api)
return -1;
}
+ if (CHECK_FLAG(api->message, ZAPI_MESSAGE_TABLEID))
+ SET_FLAG(api->flags, ZEBRA_FLAG_TABLEID);
+
if (zapi_nexthop_encode(s, api_nh, api->flags,
api->message)
!= 0)