summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike RE Mallin <mremallin@gmail.com>2024-05-21 16:27:17 +0200
committerMike RE Mallin <mremallin@gmail.com>2024-05-31 16:27:22 +0200
commita514e34e30c64d52d6bf23f27319880348c6c7f2 (patch)
tree9676451f1e6aad6ff920ec03e7d92969d775f68e
parenttests: Extend prefix_sg print UT for IPv6 (diff)
downloadfrr-a514e34e30c64d52d6bf23f27319880348c6c7f2.tar.xz
frr-a514e34e30c64d52d6bf23f27319880348c6c7f2.zip
bgpd, lib, zebra: Extend ES_VTEP_LIST_STR_SZ to support IPv6 addresses
Signed-off-by: Mike RE Mallin <mremallin@gmail.com>
-rw-r--r--bgpd/bgp_evpn_mh.c4
-rw-r--r--lib/prefix.h6
-rw-r--r--zebra/zebra_evpn_mh.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/bgpd/bgp_evpn_mh.c b/bgpd/bgp_evpn_mh.c
index d63e01156..7bad0bc34 100644
--- a/bgpd/bgp_evpn_mh.c
+++ b/bgpd/bgp_evpn_mh.c
@@ -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;
diff --git a/lib/prefix.h b/lib/prefix.h
index 48388cd01..2d679d062 100644
--- a/lib/prefix.h
+++ b/lib/prefix.h
@@ -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
diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c
index 5c19d226b..75e7e2017 100644
--- a/zebra/zebra_evpn_mh.c
+++ b/zebra/zebra_evpn_mh.c
@@ -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;