From f5e04c75827de8d1ad33338caeebbc5a26cb546c Mon Sep 17 00:00:00 2001 From: Pat Ruddy Date: Wed, 14 Oct 2020 12:50:53 +0100 Subject: [PATCH] bgpd: expose ecommunity string length Expose the max ecommunity string length for range checking in SNMP route-target string processing. Signed-off-by: Pat Ruddy --- bgpd/bgp_ecommunity.c | 1 - bgpd/bgp_ecommunity.h | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c index c358d4203e..7f6f61e141 100644 --- a/bgpd/bgp_ecommunity.c +++ b/bgpd/bgp_ecommunity.c @@ -899,7 +899,6 @@ char *ecommunity_ecom2str(struct ecommunity *ecom, int format, int filter) uint8_t *pnt; uint8_t type = 0; uint8_t sub_type = 0; -#define ECOMMUNITY_STRLEN 64 int str_size; char *str_buf; diff --git a/bgpd/bgp_ecommunity.h b/bgpd/bgp_ecommunity.h index 6d0275a0c3..03b23fcd37 100644 --- a/bgpd/bgp_ecommunity.h +++ b/bgpd/bgp_ecommunity.h @@ -103,6 +103,9 @@ /* Extended Communities type flag. */ #define ECOMMUNITY_FLAG_NON_TRANSITIVE 0x40 +/* Extended Community readable string length */ +#define ECOMMUNITY_STRLEN 64 + /* Extended Communities attribute. */ struct ecommunity { /* Reference counter. */ -- 2.39.5