summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bgpd.go2
-rw-r--r--server/peer.go3
2 files changed, 3 insertions, 2 deletions
diff --git a/bgpd.go b/bgpd.go
index 64e94363..6188d86a 100644
--- a/bgpd.go
+++ b/bgpd.go
@@ -157,7 +157,7 @@ func main() {
added = newConfig.NeighborList
deleted = []config.NeighborType{}
} else {
- _, added, deleted = config.UpdateConfig(bgpConfig, &newConfig)
+ bgpConfig, added, deleted = config.UpdateConfig(bgpConfig, &newConfig)
}
for _, p := range added {
diff --git a/server/peer.go b/server/peer.go
index 6f0d2f6b..437ea38c 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -259,7 +259,8 @@ func (peer *Peer) loop() error {
select {
case <-peer.t.Dying():
close(peer.acceptedConnCh)
- h.Stop()
+ h.fsm.outgoing <- bgp.NewBGPNotificationMessage(bgp.BGP_ERROR_CEASE, bgp.BGP_ERROR_SUB_PEER_DECONFIGURED, nil)
+ h.Wait()
close(peer.incoming)
close(peer.outgoing)
return nil