summaryrefslogtreecommitdiff
path: root/zebra/zebra_fpm_protobuf.c
diff options
context:
space:
mode:
authorSergey Fionov <fionov@gmail.com>2018-03-29 01:51:31 +0300
committerSergey Fionov <fionov@gmail.com>2018-03-29 19:09:43 +0300
commit1a6a5e69dfc6ed2c5978f2cd6ced4b465e6bb1dd (patch)
treea7a02fa697ff3295e727d4e88d9b44cbe99ca8e8 /zebra/zebra_fpm_protobuf.c
parent615e608d76bd3e1acf1769c914142210ac88e3f7 (diff)
zebra: Set "has" flags on optional scalar fields of FPM protobuf messages
Otherwise, these fields are not serialized. Signed-off-by: Sergey Fionov <fionov@gmail.com>
Diffstat (limited to 'zebra/zebra_fpm_protobuf.c')
-rw-r--r--zebra/zebra_fpm_protobuf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/zebra_fpm_protobuf.c b/zebra/zebra_fpm_protobuf.c
index e661b6efc7..ebd632270c 100644
--- a/zebra/zebra_fpm_protobuf.c
+++ b/zebra/zebra_fpm_protobuf.c
@@ -163,6 +163,7 @@ static Fpm__AddRoute *create_add_route_message(qpb_allocator_t *allocator,
msg->sub_address_family = QPB__SUB_ADDRESS_FAMILY__UNICAST;
msg->key = fpm_route_key_create(allocator, rib_dest_prefix(dest));
qpb_protocol_set(&msg->protocol, re->type);
+ msg->has_route_type = 1;
msg->route_type = FPM__ROUTE_TYPE__NORMAL;
msg->metric = re->metric;
@@ -245,6 +246,7 @@ static Fpm__Message *create_route_message(qpb_allocator_t *allocator,
fpm__message__init(msg);
if (!re) {
+ msg->has_type = 1;
msg->type = FPM__MESSAGE__TYPE__DELETE_ROUTE;
msg->delete_route =
create_delete_route_message(allocator, dest, re);
@@ -255,6 +257,7 @@ static Fpm__Message *create_route_message(qpb_allocator_t *allocator,
return msg;
}
+ msg->has_type = 1;
msg->type = FPM__MESSAGE__TYPE__ADD_ROUTE;
msg->add_route = create_add_route_message(allocator, dest, re);
if (!msg->add_route) {