From: Pat Ruddy Date: Wed, 14 Oct 2020 11:50:53 +0000 (+0100) Subject: bgpd: expose ecommunity string length X-Git-Tag: base_8.0~405^2~5 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f5e04c75827de8d1ad33338caeebbc5a26cb546c;p=matthieu%2Ffrr.git 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 --- 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. */