diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-07-26 14:12:21 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-07-26 14:12:21 +0900 |
commit | 9e775f56dc99d36aa5bf0e6fe0074945889b0166 (patch) | |
tree | 580b1ccc094b6f996b582d91312f3c8370891df2 | |
parent | 7284d4cf8b3f9ecd03068dfa3ab3d433860b5089 (diff) |
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 <fujita.tomonori@gmail.com>
-rw-r--r-- | internal/pkg/config/default.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 |