diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index d5223a1e6e..ec9f12d61a 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -4682,6 +4682,10 @@ bgp_size_t bgp_packet_attribute(struct bgp *bgp, struct peer *peer, * there! (JK) * Folks, talk to me: what is reasonable here!? */ + + /* Make sure dup aspath before the modification */ + if (aspath == attr->aspath) + aspath = aspath_dup(attr->aspath); aspath = aspath_delete_confed_seq(aspath); stream_putc(s,