Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix base error's value #432

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions loxinet/dpbroker.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ import (
"sync"
"time"

cmn "github.com/loxilb-io/loxilb/common"
tk "github.com/loxilb-io/loxilib"

cmn "github.com/loxilb-io/loxilb/common"
)

// man names constants
Expand All @@ -43,7 +44,7 @@ const (

// error codes
const (
DpErrBase = iota - L3ErrBase - 1000
DpErrBase = iota - 103000
DpWqUnkErr
)

Expand Down Expand Up @@ -311,7 +312,7 @@ type DpCtInfo struct {
ServProto string `json:"servproto"`
L4ServPort uint16 `json:"l4servproto"`
BlockNum uint16 `json:"blocknum"`
RuleID uint32 `json:"ruleid"`
RuleID uint32 `json:"ruleid"`
}

const (
Expand Down Expand Up @@ -817,7 +818,7 @@ func (dp *DpH) DpMapGetCt4() []cmn.CtInfo {
switch r := ret.(type) {
case map[string]*DpCtInfo:
for _, dCti := range r {

mh.mtx.Lock()
rule := mh.zr.Rules.GetNatLbRuleByID(dCti.RuleID)
mh.mtx.Unlock()
Expand Down
5 changes: 3 additions & 2 deletions loxinet/layer3.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ import (
"fmt"
"net"

cmn "github.com/loxilb-io/loxilb/common"
tk "github.com/loxilb-io/loxilib"

cmn "github.com/loxilb-io/loxilb/common"
)

// constants
const (
L3ErrBase = iota - RtErrBase - 1000
L3ErrBase = iota - 8000
L3AddrErr
L3ObjErr
)
Expand Down
4 changes: 2 additions & 2 deletions loxinet/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import (

// error codes
const (
RuleErrBase = iota - ZoneBaseErr - 1000
RuleErrBase = iota - 7000
RuleUnknownServiceErr
RuleUnknownEpErr
RuleExistsErr
Expand Down Expand Up @@ -272,7 +272,7 @@ type ruleEnt struct {
act ruleAct
secIP []ruleNatSIP
stat ruleStat
name string
name string
}

type ruleTable struct {
Expand Down
5 changes: 3 additions & 2 deletions loxinet/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ import (
"fmt"
"net"

cmn "github.com/loxilb-io/loxilb/common"
tk "github.com/loxilb-io/loxilib"

cmn "github.com/loxilb-io/loxilb/common"
)

// error codes for session api
const (
SessErrBase = iota - 90000
SessErrBase = iota - 102000
SessModErr
SessNoExistErr
SessExistsErr
Expand Down
2 changes: 1 addition & 1 deletion loxinet/zones.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

// error codes for zone
const (
ZoneBaseErr = iota - RtErrBase - 1000
ZoneBaseErr = iota - 6000
ZoneExistsErr
ZoneNotExistErr
ZoneNumberErr
Expand Down
Loading