summaryrefslogtreecommitdiffhomepage
path: root/api
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-07-26 07:58:18 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-07-26 08:09:02 +0900
commitd712de0dc604aafd609a6bfecdef867f7d43e46e (patch)
tree320e8a57abd8c62b0ac753c06c910388d3077639 /api
parent22772c0e62ab215a9872761ca01d103e297f98bd (diff)
api: add addpath support to AddPath API and cli
$gobgp global rib add 10.0.0.0/24 identifier 20 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'api')
-rw-r--r--api/grpc_server.go1
-rw-r--r--api/util.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/api/grpc_server.go b/api/grpc_server.go
index 419fd2b6..3101fb2f 100644
--- a/api/grpc_server.go
+++ b/api/grpc_server.go
@@ -651,6 +651,7 @@ func (s *Server) api2PathList(resource Resource, ApiPathList []*Path) ([]*table.
if err != nil {
return nil, err
}
+ nlri.SetPathIdentifier(path.Identifier)
}
for _, attr := range path.Pattrs {
diff --git a/api/util.go b/api/util.go
index 53d4f1df..4f37309f 100644
--- a/api/util.go
+++ b/api/util.go
@@ -120,6 +120,7 @@ func (p *Path) ToNativePath(option ...ToNativeOption) (*table.Path, error) {
}
t := time.Unix(p.Age, 0)
nlri.SetPathIdentifier(p.Identifier)
+ nlri.SetPathLocalIdentifier(p.LocalIdentifier)
path := table.NewPath(info, nlri, p.IsWithdraw, pattr, t, false)
path.SetValidation(&table.Validation{
Status: config.IntToRpkiValidationResultTypeMap[int(p.Validation)],