From 9e775f56dc99d36aa5bf0e6fe0074945889b0166 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Fri, 26 Jul 2019 14:12:21 +0900 Subject: fix PeerGroup AFI handling This fixes a bug that the duplicated AFI is configured with the peer group. OverwriteNeighborConfigWithPeerGroup() appends the peer group's AFI configuration to the existing one instead overwriting. Signed-off-by: FUJITA Tomonori --- internal/pkg/config/default.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/pkg/config') diff --git a/internal/pkg/config/default.go b/internal/pkg/config/default.go index 3ac8db34..c847ba4a 100644 --- a/internal/pkg/config/default.go +++ b/internal/pkg/config/default.go @@ -521,7 +521,7 @@ 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 = append(c.AfiSafis, pg.AfiSafis...) + c.AfiSafis = append([]AfiSafi{}, pg.AfiSafis...) } return nil -- cgit v1.2.3