Skip to content

Commit

Permalink
fix PeerGroup AFI handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
fujita committed Jul 26, 2019
1 parent 7284d4c commit 9e775f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pkg/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e775f5

Please sign in to comment.