summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2021-08-07 15:12:02 -0400
committerGitHub <noreply@github.com>2021-08-07 15:12:02 -0400
commitf932b4eef3b58e5890dd8dbb750cba11a212d440 (patch)
tree89e87889ff2f80e22597eb57dce9041da7c93209
parent720f165fc9f9d207b6daa5b1d8802f944d219bd4 (diff)
parentb5bb70e3779f4e9dcf93edc64c7c47bda533bcd7 (diff)
Merge pull request #9313 from idryzhov/bgp-zebra-opaque
BGP opaque data improvements
-rw-r--r--lib/route_opaque.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/route_opaque.h b/lib/route_opaque.h
index 599a0363eb..7c4e9a16e1 100644
--- a/lib/route_opaque.h
+++ b/lib/route_opaque.h
@@ -21,12 +21,15 @@
#ifndef FRR_ROUTE_OPAQUE_H
#define FRR_ROUTE_OPAQUE_H
+#include "assert.h"
+#include "zclient.h"
+
#include "bgpd/bgp_aspath.h"
#include "bgpd/bgp_community.h"
#include "bgpd/bgp_lcommunity.h"
struct bgp_zebra_opaque {
- char aspath[ASPATH_STR_DEFAULT_LEN];
+ char aspath[256];
/* Show at least 10 communities AA:BB */
char community[COMMUNITY_SIZE * 20];
@@ -35,4 +38,7 @@ struct bgp_zebra_opaque {
char lcommunity[LCOMMUNITY_SIZE * 30];
};
+static_assert(sizeof(struct bgp_zebra_opaque) <= ZAPI_MESSAGE_OPAQUE_LENGTH,
+ "BGP opaque data shouldn't be larger than zebra's buffer");
+
#endif /* FRR_ROUTE_OPAQUE_H */