diff --git a/service/build.bat b/service/build.bat index 77a47623..7d1e7420 100644 --- a/service/build.bat +++ b/service/build.bat @@ -14,7 +14,7 @@ REM See the License for the specific language governing permissions and REM limitations under the License. REM SET REPO_URL=https://github.com/openziti/ziti-tunnel-sdk-c.git -SET ZITI_TUNNEL_REPO_BRANCH=v0.15.21 +SET ZITI_TUNNEL_REPO_BRANCH=v0.15.22 REM override the c sdk used in the build - leave blank for the same as specified in the tunneler sdk SET ZITI_SDK_C_BRANCH= REM the number of TCP connections the tunneler sdk can have at any one time diff --git a/service/cziti/sdk.go b/service/cziti/sdk.go index 6c867cc0..f526da9e 100644 --- a/service/cziti/sdk.go +++ b/service/cziti/sdk.go @@ -798,7 +798,7 @@ func zitiError(code C.int) error { return nil } -func LoadZiti(zid *ZIdentity, cfg string, refreshInterval int) { +func LoadZiti(zid *ZIdentity, cfg string, refreshInterval int, apiPageSize int) { zid.Options.config = C.CString(cfg) zid.Options.refresh_interval = C.long(refreshInterval) zid.Options.metrics_type = C.INSTANT @@ -807,7 +807,7 @@ func LoadZiti(zid *ZIdentity, cfg string, refreshInterval int) { zid.Options.pq_mac_cb = C.ziti_pq_mac_cb(C.ziti_pq_mac_go) zid.Options.pq_os_cb = C.ziti_pq_os_cb(C.ziti_pq_os_go) zid.Options.pq_process_cb = C.ziti_pq_process_cb(C.ziti_pq_process_go) - + zid.Options.api_page_size = C.uint32_t(apiPageSize) zid.Options.events = C.ZitiContextEvent | C.ZitiServiceEvent | C.ZitiRouterEvent | C.ZitiMfaAuthEvent zid.Options.event_cb = C.ziti_event_cb(C.eventCB) diff --git a/service/ziti-tunnel/constants/consts.go b/service/ziti-tunnel/constants/consts.go index 6571b0aa..0720d33c 100644 --- a/service/ziti-tunnel/constants/consts.go +++ b/service/ziti-tunnel/constants/consts.go @@ -28,4 +28,6 @@ const ( MfaAllSvcTimeout = 0 MfaFewSvcTimeout = 1 MfaNearingTimeout = 2 + + DefaultApiPageSize = 250 ) diff --git a/service/ziti-tunnel/dto/dtos.go b/service/ziti-tunnel/dto/dtos.go index 8e0dbbff..3eb17e2a 100644 --- a/service/ziti-tunnel/dto/dtos.go +++ b/service/ziti-tunnel/dto/dtos.go @@ -90,8 +90,7 @@ type Identity struct { MfaMaxTimeoutRem int32 MfaLastUpdatedTime time.Time ServiceUpdatedTime time.Time - Notified bool - + Notified bool } type Metrics struct { Up int64 @@ -134,6 +133,7 @@ type TunnelStatus struct { Status string AddDns bool NotificationFrequency int + ApiPageSize int } type ServiceVersion struct { @@ -203,5 +203,5 @@ type MfaResponse struct { type ControllerEvent struct { ActionEvent - Fingerprint string + Fingerprint string } diff --git a/service/ziti-tunnel/service/ipc.go b/service/ziti-tunnel/service/ipc.go index ac18a028..0a4d4460 100644 --- a/service/ziti-tunnel/service/ipc.go +++ b/service/ziti-tunnel/service/ipc.go @@ -78,9 +78,12 @@ func SubMain(ops chan string, changes chan<- svc.Status, winEvents <-chan Window rts.state.LogLevel = parsedLevel.String() logging.InitLogger(parsedLevel) - _ = logging.Elog.Info(InformationEvent, SvcName+" starting. log file located at "+config.LogFile()) + if rts.state.ApiPageSize < 25 { //don't allow values less than 25 + rts.state.ApiPageSize = constants.DefaultApiPageSize + } + // create a channel for notifying any connections that they are to be interrupted interrupt = make(chan struct{}, 8) @@ -1147,7 +1150,7 @@ func handleBulkServiceChange(sc cziti.BulkServiceChange) { if id != nil { var m = dto.IdentityEvent{ ActionEvent: dto.IdentityUpdateComplete, - Id: Clean(id), + Id: Clean(id), } rts.BroadcastEvent(m) } @@ -1443,4 +1446,3 @@ func updateNotificationFrequency(out *json.Encoder, notificationFreq int) { respond(out, dto.Response{Message: "Notification frequency is set", Code: SUCCESS, Error: "", Payload: ""}) } - diff --git a/service/ziti-tunnel/service/state.go b/service/ziti-tunnel/service/state.go index 720be953..9a117c18 100644 --- a/service/ziti-tunnel/service/state.go +++ b/service/ziti-tunnel/service/state.go @@ -130,6 +130,7 @@ func (t *RuntimeState) ToStatus(onlyInitialized bool) dto.TunnelStatus { TunIpv4Mask: t.state.TunIpv4Mask, AddDns: t.state.AddDns, NotificationFrequency: t.state.NotificationFrequency, + ApiPageSize: t.state.ApiPageSize, } i := 0 @@ -305,7 +306,8 @@ func (t *RuntimeState) LoadIdentity(id *Id, refreshInterval int) { id.CId = cziti.NewZid(sc) id.CId.Active = id.Active - cziti.LoadZiti(id.CId, id.Path(), refreshInterval) + log.Debugf("Default API PAGE SIZE set to: %d", rts.state.ApiPageSize) + cziti.LoadZiti(id.CId, id.Path(), refreshInterval, rts.state.ApiPageSize) } func (t *RuntimeState) LoadConfig() { diff --git a/version b/version index 2ee4474a..1f294393 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.10.10 +1.10.10.1