diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-05-10 11:10:47 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-05-10 12:42:51 +0900 |
commit | 18738e1b437aad7d30eb4fd6687ff3e7b0c77a17 (patch) | |
tree | 8a40161c8723c8e0062c5fbd515f997077fafdbf /server | |
parent | 8c934a2c5e6ca3cd1805844ba059b448cb914c01 (diff) |
server: log the change of admin state via config file
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r-- | server/server.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/server.go b/server/server.go index bb1459b7..c69b6b76 100644 --- a/server/server.go +++ b/server/server.go @@ -2448,6 +2448,15 @@ func (server *BgpServer) handleUpdateNeighbor(c *config.Neighbor) ([]*SenderMsg, sub := uint8(bgp.BGP_ERROR_SUB_OTHER_CONFIGURATION_CHANGE) if original.Config.AdminDown != c.Config.AdminDown { sub = bgp.BGP_ERROR_SUB_ADMINISTRATIVE_SHUTDOWN + state := "Admin Down" + if c.Config.AdminDown == false { + state = "Admin Up" + } + log.WithFields(log.Fields{ + "Topic": "Peer", + "Key": peer.ID(), + "State": state, + }).Info("update admin-state configuration") } else if original.Config.PeerAs != c.Config.PeerAs { sub = bgp.BGP_ERROR_SUB_PEER_DECONFIGURED } |