summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_routemap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index fe6faffa6e..728a30ac81 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -1256,8 +1256,7 @@ route_set_evpn_gateway_ip(void *rule, const struct prefix *prefix, void *object)
/* Set gateway-ip value. */
path->attr->evpn_overlay.type = OVERLAY_INDEX_GATEWAY_IP;
- memcpy(&path->attr->evpn_overlay.gw_ip, &gw_ip->ip.addr,
- IPADDRSZ(gw_ip));
+ path->attr->evpn_overlay.gw_ip = *gw_ip;
return RMAP_OKAY;
}