diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-29 00:07:26 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-29 00:07:26 +0900 |
commit | 0147728f77aa1871714b5dd23260732caeceb7ed (patch) | |
tree | 3e7570a99d1e7c78f32cb6aba94ccd73b528fd2e /gobgpd/main.go | |
parent | c3560d1224f7759455b6916843341b20355dbfe5 (diff) |
move gRPC-related code for SoftReset to grpc_server.go
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'gobgpd/main.go')
-rw-r--r-- | gobgpd/main.go | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/gobgpd/main.go b/gobgpd/main.go index 4c083953..d76735d7 100644 --- a/gobgpd/main.go +++ b/gobgpd/main.go @@ -22,6 +22,7 @@ import ( p "github.com/kr/pretty" "github.com/osrg/gobgp/config" ops "github.com/osrg/gobgp/openswitch" + "github.com/osrg/gobgp/packet/bgp" "github.com/osrg/gobgp/server" "io/ioutil" "log/syslog" @@ -276,20 +277,7 @@ func main() { } if updatePolicy { - // TODO: we want to apply the new policies to the existing - // routes here. Sending SOFT_RESET_IN to all the peers works - // for the change of in and import policies. SOFT_RESET_OUT is - // necessary for the export policy but we can't blindly - // execute SOFT_RESET_OUT because we unnecessarily advertize - // the existing routes. Needs to investigate the changes of - // policies and handle only affected peers. - ch := make(chan *server.GrpcResponse) - bgpServer.GrpcReqCh <- &server.GrpcRequest{ - RequestType: server.REQ_NEIGHBOR_SOFT_RESET_IN, - Name: "all", - ResponseCh: ch, - } - <-ch + bgpServer.SoftResetIn("", bgp.RouteFamily(0)) } case sig := <-sigCh: switch sig { |