BGP opaque data shouldn't be larger than zebra's buffer.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
#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"
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 */