diff options
Diffstat (limited to 'pkg/server/grpc_server.go')
-rw-r--r-- | pkg/server/grpc_server.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/server/grpc_server.go b/pkg/server/grpc_server.go index b0cae8d3..289ab7ba 100644 --- a/pkg/server/grpc_server.go +++ b/pkg/server/grpc_server.go @@ -733,6 +733,10 @@ func newNeighborFromAPIStruct(a *api.Peer) (*config.Neighbor, error) { pconf.EbgpMultihop.Config.Enabled = a.EbgpMultihop.Enabled pconf.EbgpMultihop.Config.MultihopTtl = uint8(a.EbgpMultihop.MultihopTtl) } + if a.TtlSecurity != nil { + pconf.TtlSecurity.Config.Enabled = a.TtlSecurity.Enabled + pconf.TtlSecurity.Config.TtlMin = uint8(a.TtlSecurity.TtlMin) + } if a.State != nil { pconf.State.SessionState = config.SessionState(strings.ToUpper(string(a.State.SessionState))) pconf.State.AdminState = config.IntToAdminStateMap[int(a.State.AdminState)] @@ -836,6 +840,10 @@ func newPeerGroupFromAPIStruct(a *api.PeerGroup) (*config.PeerGroup, error) { pconf.EbgpMultihop.Config.Enabled = a.EbgpMultihop.Enabled pconf.EbgpMultihop.Config.MultihopTtl = uint8(a.EbgpMultihop.MultihopTtl) } + if a.TtlSecurity != nil { + pconf.TtlSecurity.Config.Enabled = a.TtlSecurity.Enabled + pconf.TtlSecurity.Config.TtlMin = uint8(a.TtlSecurity.TtlMin) + } if a.Info != nil { pconf.State.TotalPaths = a.Info.TotalPaths pconf.State.TotalPrefixes = a.Info.TotalPrefixes |