summaryrefslogtreecommitdiffstats
path: root/zebra/zserv.h
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2019-12-17 23:00:52 +0100
committerStephen Worley <sworley@cumulusnetworks.com>2020-01-08 18:22:29 +0100
commit9ab0b2a37afc6b098e9ae444459dbb783ad0a5ff (patch)
tree3b8a18344f931ad514ee2123f99e653576e04bf7 /zebra/zserv.h
parentMerge pull request #5551 from mjstapp/fix_zebra_show_nhg (diff)
downloadfrr-9ab0b2a37afc6b098e9ae444459dbb783ad0a5ff.tar.xz
frr-9ab0b2a37afc6b098e9ae444459dbb783ad0a5ff.zip
lib,zebra: add zapi msg top level error handling
Add error handling for top level failures (not able to execute command, unable to find vrf for command, etc.) With this error handling we add a new zapi message type of ZEBRA_ERROR used when we are unable to properly handle a zapi command and pass it down into the lower level code. In the event of this, we reply with a message of type enum zebra_error_types containing the error type. The sent packet will look like so: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length | Marker | Version | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VRF ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Command | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ERROR TYPE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Also add appropriate hooks for clients to subscribe to for handling these types of errors. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/zserv.h')
-rw-r--r--zebra/zserv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/zebra/zserv.h b/zebra/zserv.h
index ccc8d92aa..d8d82a52e 100644
--- a/zebra/zserv.h
+++ b/zebra/zserv.h
@@ -146,6 +146,7 @@ struct zserv {
uint32_t v6_nh_watch_rem_cnt;
uint32_t vxlan_sg_add_cnt;
uint32_t vxlan_sg_del_cnt;
+ uint32_t error_cnt;
time_t nh_reg_time;
time_t nh_dereg_time;