diff options
author | Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> | 2017-10-19 16:32:34 +0900 |
---|---|---|
committer | Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> | 2017-11-08 10:14:21 +0900 |
commit | ab9532119159e36cadf1ace3cf44773d40971729 (patch) | |
tree | 96bee97ac3144367992dae43e29817c6f4ac4333 /server/peer.go | |
parent | 5c16d53c7fa0fc19cb7087d61fbf8c7bfa94910f (diff) |
config: Properly set config of PeerGroup member
Currently, the config of PeerGroup members are not set properly.
For example, if LocalAs of the neighbor is not set in the config file,
LocalAs will be set to Global.As as a default value.
After this, however, if the neighbor is a member of a peer group,
LocalAs will be unexpectedly overwritten by the peer group config.
This commit fixes this by setting default values after
applying the peer group config.
Adding to this, this commit avoids unnecessary applying
the peer group config.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Diffstat (limited to 'server/peer.go')
-rw-r--r-- | server/peer.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/peer.go b/server/peer.go index 135713f9..44bb89db 100644 --- a/server/peer.go +++ b/server/peer.go @@ -79,7 +79,7 @@ func newDynamicPeer(g *config.Global, neighborAddress string, pg *config.PeerGro }).Debugf("Can't overwrite neighbor config: %s", err) return nil } - if err := config.SetDefaultNeighborConfigValues(&conf, g); err != nil { + if err := config.SetDefaultNeighborConfigValues(&conf, pg, g); err != nil { log.WithFields(log.Fields{ "Topic": "Peer", "Key": neighborAddress, |