]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd, lib, zebra: Extend ES_VTEP_LIST_STR_SZ to support IPv6 addresses 15900/head
authorMike RE Mallin <mremallin@gmail.com>
Tue, 21 May 2024 14:27:17 +0000 (10:27 -0400)
committerMike RE Mallin <mremallin@gmail.com>
Fri, 31 May 2024 14:27:22 +0000 (10:27 -0400)
Signed-off-by: Mike RE Mallin <mremallin@gmail.com>
bgpd/bgp_evpn_mh.c
lib/prefix.h
zebra/zebra_evpn_mh.c

index d63e011560a5809ed92f84b05f814c74033a65cd..7bad0bc3413af59a09f262a1b6ab094ea0390322 100644 (file)
@@ -2455,7 +2455,7 @@ static void bgp_evpn_es_frag_show_detail(struct vty *vty,
 }
 
 static char *bgp_evpn_es_vteps_str(char *vtep_str, struct bgp_evpn_es *es,
-                                  uint8_t vtep_str_size)
+                                  size_t vtep_str_size)
 {
        char vtep_flag_str[BGP_EVPN_FLAG_STR_SZ];
        struct listnode *node;
@@ -3956,7 +3956,7 @@ void bgp_evpn_vni_es_cleanup(struct bgpevpn *vpn)
 
 static char *bgp_evpn_es_evi_vteps_str(char *vtep_str,
                                       struct bgp_evpn_es_evi *es_evi,
-                                      uint8_t vtep_str_size)
+                                      size_t vtep_str_size)
 {
        char vtep_flag_str[BGP_EVPN_FLAG_STR_SZ];
        struct listnode *node;
index 48388cd019ebd202e7e06ae00700992a035942e9..2d679d06224fe940e109082d9190591e869240fa 100644 (file)
@@ -52,10 +52,10 @@ typedef enum {
 /* Maximum number of VTEPs per-ES -
  * XXX - temporary limit for allocating strings etc.
  */
-#define ES_VTEP_MAX_CNT 10
-#define ES_VTEP_LIST_STR_SZ (ES_VTEP_MAX_CNT * 16)
+#define ES_VTEP_MAX_CNT            10
+#define ES_VTEP_LIST_STR_SZ (ES_VTEP_MAX_CNT * IPADDR_STRING_SIZE)
 
-#define ETHER_ADDR_STRLEN (3*ETH_ALEN)
+#define ETHER_ADDR_STRLEN (3 * ETH_ALEN)
 /*
  * there isn't a portable ethernet address type. We define our
  * own to simplify internal handling
index 5c19d226b16aa6cb3a1af2a5ba4ae21a1911b02a..75e7e20176a950a620b6b52b2ebaae60ab6c6276 100644 (file)
@@ -3026,7 +3026,7 @@ void zebra_evpn_es_if_oper_state_change(struct zebra_if *zif, bool up)
 }
 
 static char *zebra_evpn_es_vtep_str(char *vtep_str, struct zebra_evpn_es *es,
-                                   uint8_t vtep_str_size)
+                                   size_t vtep_str_size)
 {
        struct zebra_evpn_es_vtep *zvtep;
        struct listnode *node;