]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: expose ecommunity string length
authorPat Ruddy <pat@voltanet.io>
Wed, 14 Oct 2020 11:50:53 +0000 (12:50 +0100)
committerPat Ruddy <pat@voltanet.io>
Tue, 2 Feb 2021 09:37:13 +0000 (09:37 +0000)
Expose the max ecommunity string length for range checking
in SNMP route-target string processing.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
bgpd/bgp_ecommunity.c
bgpd/bgp_ecommunity.h

index c358d4203ed4f2cb4a18466fe420affc3ec42b4d..7f6f61e1417aef8c5d5d6bfdb984556eaa7ad960 100644 (file)
@@ -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;
 
index 6d0275a0c3bab9a8b94c52207803cf39fd1184c9..03b23fcd37405e6d10d02474cc5b14fbe54aab20 100644 (file)
 /* 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.  */