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 spelling mistake #905

Closed
Closed
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
4 changes: 2 additions & 2 deletions tools/dpvs-agent/cmd/ipvs/put_vs_vip_port.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ func (h *putVsItem) Handle(params apiVs.PutVsVipPortParams) middleware.Responder
vs.SetFlagsExpireQuiescent()
}

if params.Spec.SyncProxy != nil && *params.Spec.SyncProxy {
vs.SetFlagsSyncProxy()
if params.Spec.SynProxy != nil && *params.Spec.SynProxy {
vs.SetFlagsSynProxy()
}
}

Expand Down
1 change: 0 additions & 1 deletion tools/dpvs-agent/cmd/ipvs/put_vs_vip_port_laddr.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func (h *putVsLaddr) Handle(params apiVs.PutVsVipPortLaddrParams) middleware.Res
lds := make([]*types.LocalAddrDetail, 1)

lds[0] = types.NewLocalAddrDetail()
lds[0].SetAf(laddr.GetAf())
lds[0].SetAddr(params.Spec.Addr)
lds[0].SetIfName(params.Spec.Device)

Expand Down
4 changes: 2 additions & 2 deletions tools/dpvs-agent/dpvs-agent-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ definitions:
format: "uint32"
Flags:
type: "string"
SyncProxy:
SynProxy:
type: "string"
enum:
- "true"
Expand Down Expand Up @@ -556,7 +556,7 @@ definitions:
#Flags:
# type: "integer"
# format: "uint32"
SyncProxy:
SynProxy:
type: "boolean"
default: false
ExpireQuiescent:
Expand Down
28 changes: 14 additions & 14 deletions tools/dpvs-agent/models/virtual_server_spec_expand.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tools/dpvs-agent/models/virtual_server_spec_tiny.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tools/dpvs-agent/pkg/ipc/types/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (e *DpvsFwdMode) String() string {
case DPVS_FWD_MODE_DR:
return "DR"
case DPVS_FWD_MODE_TUNNEL:
return "TUNNLE"
return "TUNNEL"
case DPVS_FWD_MODE_BYPASS:
return "BYPASS"
case DPVS_FWD_MODE_SNAT:
Expand All @@ -115,7 +115,7 @@ func (e *DpvsFwdMode) FromString(name string) {
*e = DPVS_FWD_LOCALNODE
case "DR":
*e = DPVS_FWD_MODE_DR
case "TUNNLE":
case "TUNNEL":
*e = DPVS_FWD_MODE_TUNNEL
case "BYPASS":
*e = DPVS_FWD_MODE_BYPASS
Expand Down
4 changes: 2 additions & 2 deletions tools/dpvs-agent/pkg/ipc/types/getmodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (vs *VirtualServerSpec) GetModel() *models.VirtualServerSpecExpand {
Port: vs.GetPort(),
Proto: vs.GetProto(),
Fwmark: vs.GetFwmark(),
SyncProxy: "false",
SynProxy: "false",
ExpireQuiescent: "false",
SchedName: vs.GetSchedName(),
Timeout: vs.GetTimeout(),
Expand All @@ -40,7 +40,7 @@ func (vs *VirtualServerSpec) GetModel() *models.VirtualServerSpecExpand {

flags := ""
if (vs.GetFlags() & DPVS_SVC_F_SYNPROXY) != 0 {
modelVs.SyncProxy = "true"
modelVs.SynProxy = "true"
flags += "SynProxy|"
}

Expand Down
7 changes: 6 additions & 1 deletion tools/dpvs-agent/pkg/ipc/types/laddr.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func (o *LocalAddrFront) GetAf() uint32 {
func (o *LocalAddrFront) SetAf(af uint32) {
o.af = af
}

func (o *LocalAddrFront) SetAfByAddr(addr string) {
i := strings.Index(addr, "/")
if i != -1 {
Expand Down Expand Up @@ -243,7 +244,7 @@ func (o *LocalAddrDetail) Dump(buf []byte) bool {
return o.Copy(tmp)
}

func (o *LocalAddrDetail) SetAf(af uint32) {
func (o *LocalAddrDetail) setAf(af uint32) {
o.af = af
}

Expand Down Expand Up @@ -292,10 +293,14 @@ func (o *LocalAddrDetail) GetAddr() string {
func (o *LocalAddrDetail) SetAddr(addr string) {
if strings.Contains(addr, ":") {
copy(o.addr[:], net.ParseIP(addr))
// o.af = unix.AF_INET6
o.setAf(unix.AF_INET6)
} else {
buf := new(bytes.Buffer)
binary.Write(buf, binary.LittleEndian, net.ParseIP(addr))
copy(o.addr[:], buf.Bytes()[12:])
// o.af = unix.AF_INET
o.setAf(unix.AF_INET)
}
}

Expand Down
2 changes: 1 addition & 1 deletion tools/dpvs-agent/pkg/ipc/types/virtualserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func (vs *VirtualServerSpec) GetFwmark() uint32 {
return vs.fwmark
}

func (vs *VirtualServerSpec) SetFlagsSyncProxy() {
func (vs *VirtualServerSpec) SetFlagsSynProxy() {
vs.setFlags(DPVS_SVC_F_SYNPROXY)
}

Expand Down
32 changes: 16 additions & 16 deletions tools/dpvs-agent/restapi/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tools/dpvs-agent/restapi/server.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading