config: Copy afi-safi objects from peer group to neighbor instead of share the same array

This commit is contained in:
wanghonghao
2018-07-06 10:05:42 +09:00
committed by FUJITA Tomonori
parent 8e6bd4c714
commit 6192f90200
+3 -1
View File
@@ -496,7 +496,9 @@ func OverwriteNeighborConfigWithPeerGroup(c *Neighbor, pg *PeerGroup) error {
overwriteConfig(&c.TtlSecurity.Config, &pg.TtlSecurity.Config, "neighbor.ttl-security.config", v)
if !v.IsSet("neighbor.afi-safis") {
c.AfiSafis = pg.AfiSafis
for _, afiSafi := range pg.AfiSafis {
c.AfiSafis = append(c.AfiSafis, afiSafi)
}
}
return nil