summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-05-10 02:20:07 +0000
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-05-10 02:20:07 +0000
commitd7e1add28af9aec2ad61d2779651b17f5e6ab7ac (patch)
treea0829be4a626d9382ae13cdfc89e2bf7629224a0
parentbcb6c38b472e4384df77fad7a2497e0c129336c6 (diff)
server: don't modify admin-down config
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
-rw-r--r--server/fsm.go1
-rw-r--r--server/server.go4
2 files changed, 4 insertions, 1 deletions
diff --git a/server/fsm.go b/server/fsm.go
index 618d3b6c..288e3bb1 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -1308,7 +1308,6 @@ func (h *FSMHandler) changeAdminState(s AdminState) error {
fsm.adminState = s
fsm.pConf.State.AdminDown = !fsm.pConf.State.AdminDown
- fsm.pConf.Config.AdminDown = !fsm.pConf.Config.AdminDown
switch s {
case ADMIN_STATE_UP:
diff --git a/server/server.go b/server/server.go
index 495b5d4b..8d156ae9 100644
--- a/server/server.go
+++ b/server/server.go
@@ -2382,6 +2382,10 @@ func (server *BgpServer) handleUpdateNeighbor(c *config.Neighbor) ([]*SenderMsg,
policyUpdated := false
if !peer.fsm.pConf.ApplyPolicy.Equal(&c.ApplyPolicy) {
+ log.WithFields(log.Fields{
+ "Topic": "Peer",
+ "Key": addr,
+ }).Info("Update ApplyPolicy")
server.setPolicyByConfig(peer.ID(), c.ApplyPolicy)
peer.fsm.pConf.ApplyPolicy = c.ApplyPolicy
policyUpdated = true