From 34bb7441a8a7586e2d3406e56aa15b62009a6fb9 Mon Sep 17 00:00:00 2001 From: Trekkie Coder Date: Mon, 11 Dec 2023 17:30:26 +0900 Subject: [PATCH] udp ep probe fixes --- go.mod | 2 +- go.sum | 2 ++ loxinet/rules.go | 10 +++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index bb705c3f..8da5159d 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/go-openapi/swag v0.22.3 github.com/go-openapi/validate v0.22.0 github.com/jessevdk/go-flags v1.5.0 - github.com/loxilb-io/loxilib v0.8.8 + github.com/loxilb-io/loxilib v0.8.9-0.20231211082246-dc641488569f github.com/osrg/gobgp/v3 v3.5.0 github.com/prometheus-community/pro-bing v0.1.0 github.com/prometheus/client_model v0.3.0 diff --git a/go.sum b/go.sum index c5f513e4..d5b46893 100644 --- a/go.sum +++ b/go.sum @@ -235,6 +235,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/loxilb-io/loxilib v0.8.8 h1:nW6RvLXDQxr5Pe2Ygg7qyYm4QG5y5cG+/jQ4m/DckP4= github.com/loxilb-io/loxilib v0.8.8/go.mod h1:LoQCxBz+N0fO9rGwRmPHrQPHol/jUf4MNpph63Cydkg= +github.com/loxilb-io/loxilib v0.8.9-0.20231211082246-dc641488569f h1:q745LqB2G97bOpf6MCa34VyNJEuvVx4rTFVut3kz9oo= +github.com/loxilb-io/loxilib v0.8.9-0.20231211082246-dc641488569f/go.mod h1:LoQCxBz+N0fO9rGwRmPHrQPHol/jUf4MNpph63Cydkg= github.com/loxilb-io/sctp v0.0.0-20230519081703-6d1baec82fd4 h1:oDc2lsbfuQEcVP3k+Pw4v6Xdm3t4M9vBc1Y9egszv6g= github.com/loxilb-io/sctp v0.0.0-20230519081703-6d1baec82fd4/go.mod h1:1a6hv8ISVQhnW5IVpW9o+OL6BAFlWiVpC0O4d19g+wQ= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= diff --git a/loxinet/rules.go b/loxinet/rules.go index 2fdabcf9..455dcede 100644 --- a/loxinet/rules.go +++ b/loxinet/rules.go @@ -1729,9 +1729,13 @@ func (R *RuleH) AddEPHost(apiCall bool, hostName string, name string, args epHos if apiCall != true { ep.ruleCount = 1 } - ep.hID = R.lepHID % MaxEndPointCheckers - //ep.sT = time.Now() - R.lepHID++ + if args.probeType != HostProbeConnectUDP { + ep.hID = R.lepHID % MaxEndPointCheckers + //ep.sT = time.Now() + R.lepHID++ + } else { + ep.hID = 0 + } R.epMap[epKey] = ep