diff options
author | Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> | 2018-05-31 13:40:07 +0900 |
---|---|---|
committer | Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> | 2018-06-13 13:56:48 +0900 |
commit | 96034c286bdf02acac954e6860e48f1705b820ee (patch) | |
tree | a2af96f1c5b4f21c2f965734480c24aa3d286a42 /api | |
parent | 222bf4433d3c07a1490108e7b88028ec48c4ed5e (diff) |
api: Add missing fields to Peer struct conversion functions
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/grpc_server.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/api/grpc_server.go b/api/grpc_server.go index 48aa547e..8fc6e085 100644 --- a/api/grpc_server.go +++ b/api/grpc_server.go @@ -342,6 +342,7 @@ func NewPeerFromConfigStruct(pconf *config.Neighbor) *Peer { Transport: &Transport{ RemotePort: uint32(pconf.Transport.Config.RemotePort), LocalAddress: pconf.Transport.Config.LocalAddress, + PassiveMode: pconf.Transport.Config.PassiveMode, }, AfiSafis: afiSafis, AddPaths: NewAddPathsFromConfigStruct(&pconf.AddPaths), @@ -1180,6 +1181,7 @@ func NewNeighborFromAPIStruct(a *Peer) (*config.Neighbor, error) { pconf.Config.RouteFlapDamping = a.Conf.RouteFlapDamping pconf.Config.Description = a.Conf.Description pconf.Config.PeerGroup = a.Conf.PeerGroup + pconf.Config.PeerType = config.IntToPeerTypeMap[int(a.Conf.PeerType)] pconf.Config.NeighborAddress = a.Conf.NeighborAddress pconf.Config.NeighborInterface = a.Conf.NeighborInterface pconf.Config.Vrf = a.Conf.Vrf |