diff --git a/proto/server/clientEvtHandler.go b/proto/server/clientEvtHandler.go index 462c7cdf..112ad369 100644 --- a/proto/server/clientEvtHandler.go +++ b/proto/server/clientEvtHandler.go @@ -372,7 +372,7 @@ func fillSlice(client *clientNF, sliceName string, sliceConf *configmodels.Slice endp = "any" } if ruleConfig.Protocol == int32(protos.PccFlowTos_TCP.Number()) { - if ruleConfig.StartPort != 0 && ruleConfig.EndPort != 0 { + if ruleConfig.StartPort == 0 && ruleConfig.EndPort == 0 { desc = "permit out tcp from " + endp + " to assigned" } else if factory.WebUIConfig.Configuration.SdfComp { desc = "permit out tcp from " + endp + " " + strconv.FormatInt(int64(ruleConfig.StartPort), 10) + "-" + strconv.FormatInt(int64(ruleConfig.EndPort), 10) + " to assigned" @@ -380,7 +380,7 @@ func fillSlice(client *clientNF, sliceName string, sliceConf *configmodels.Slice desc = "permit out tcp from " + endp + " to assigned " + strconv.FormatInt(int64(ruleConfig.StartPort), 10) + "-" + strconv.FormatInt(int64(ruleConfig.EndPort), 10) } } else if ruleConfig.Protocol == int32(protos.PccFlowTos_UDP.Number()) { - if ruleConfig.StartPort != 0 && ruleConfig.EndPort != 0 { + if ruleConfig.StartPort == 0 && ruleConfig.EndPort == 0 { desc = "permit out udp from " + endp + " to assigned" } else if factory.WebUIConfig.Configuration.SdfComp { desc = "permit out udp from " + endp + " " + strconv.FormatInt(int64(ruleConfig.StartPort), 10) + "-" + strconv.FormatInt(int64(ruleConfig.EndPort), 10) + " to assigned" @@ -1127,7 +1127,7 @@ func postConfigPcrf(client *clientNF) { // permit out udp from 8.8.8.8/32 to assigned sport-dport var desc string if app.Protocol == 6 { - if app.StartPort != 0 && app.EndPort != 0 { + if app.StartPort == 0 && app.EndPort == 0 { desc = "permit out tcp from " + app.Endpoint + " to assigned" } else if factory.WebUIConfig.Configuration.SdfComp { desc = "permit out tcp from " + app.Endpoint + " " + strconv.FormatInt(int64(app.StartPort), 10) + "-" + strconv.FormatInt(int64(app.EndPort), 10) + " to assigned " @@ -1135,7 +1135,7 @@ func postConfigPcrf(client *clientNF) { desc = "permit out tcp from " + app.Endpoint + " to assigned " + strconv.FormatInt(int64(app.StartPort), 10) + "-" + strconv.FormatInt(int64(app.EndPort), 10) } } else if app.Protocol == 17 { - if app.StartPort != 0 && app.EndPort != 0 { + if app.StartPort == 0 && app.EndPort == 0 { desc = "permit out udp from " + app.Endpoint + " to assigned" } else if factory.WebUIConfig.Configuration.SdfComp { desc = "permit out udp from " + app.Endpoint + " " + strconv.FormatInt(int64(app.StartPort), 10) + "-" + strconv.FormatInt(int64(app.EndPort), 10) + " to assigned "