summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_evpn_vty.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c
index f920a783b3..24fa2b2a53 100644
--- a/bgpd/bgp_evpn_vty.c
+++ b/bgpd/bgp_evpn_vty.c
@@ -6625,11 +6625,14 @@ void bgp_config_write_evpn_info(struct vty *vty, struct bgp *bgp, afi_t afi,
if (CHECK_FLAG(l3rt->flags, BGP_VRF_RT_WILD)) {
char *vni_str = NULL;
- vni_str = strchr(ecom_str, ':') + 1;
+ vni_str = strchr(ecom_str, ':');
if (!vni_str)
continue; /* This should never happen */
+ /* Move pointer to vni */
+ vni_str += 1;
+
vty_out(vty, " route-target import *:%s\n",
vni_str);