summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorSatoshi Fujimoto <satoshi.fujimoto7@gmail.com>2018-04-19 15:52:41 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-05-24 10:13:56 +0900
commitabefa741b81b833943987f7540284883a48a9ffb (patch)
tree72056bf625fd6878b8d2a6d55831261ce63debc6 /server
parenteb568b68d2522a21ad87c95e427024113aea07dd (diff)
server/server: Restart peers when capabilities are changed
If capabilities are added or removed by updating peer configs, it is needed to resend Open Message contains the new capabilities. But currently, GoBGP does not resend Open Message for Add-Path and Graceful Restart capabilities. This commit fixes it to resend Open Message for them. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Diffstat (limited to 'server')
-rw-r--r--server/server.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go
index 473c255e..82b6ee4b 100644
--- a/server/server.go
+++ b/server/server.go
@@ -2250,7 +2250,7 @@ func (s *BgpServer) updateNeighbor(c *config.Neighbor) (needsSoftResetIn bool, e
needsSoftResetIn = true
}
- if !original.Config.Equal(&c.Config) || !original.Transport.Config.Equal(&c.Transport.Config) || config.CheckAfiSafisChange(original.AfiSafis, c.AfiSafis) {
+ if original.NeedsResendOpenMessage(c) {
sub := uint8(bgp.BGP_ERROR_SUB_OTHER_CONFIGURATION_CHANGE)
if original.Config.AdminDown != c.Config.AdminDown {
sub = bgp.BGP_ERROR_SUB_ADMINISTRATIVE_SHUTDOWN