Loading go-apps/meep-tm/server/bwm/bwm.go +6 −5 Original line number Diff line number Diff line Loading @@ -941,7 +941,7 @@ func bandwidthAllocationPost(w http.ResponseWriter, r *http.Request) { // verify if the RequestType attribute is 1 for session specific allocation // then SessionFilter should also provided in requested body if *bwInfo.RequestType == 1 && bwInfo.SessionFilter != nil { if *bwInfo.RequestType == 1 && len(bwInfo.SessionFilter) != 0 { for _, flowFilterVal := range bwInfo.SessionFilter { if flowFilterVal.SourceIp == "" && flowFilterVal.SourcePort == nil && flowFilterVal.DstAddress == "" && flowFilterVal.DstPort == nil && flowFilterVal.Protocol == "" { log.Error("At least one of sessionFilter subfields shall be included") Loading @@ -949,11 +949,12 @@ func bandwidthAllocationPost(w http.ResponseWriter, r *http.Request) { return } } } else if *bwInfo.RequestType == 1 && len(bwInfo.SessionFilter) == 0 { log.Error("sessionFilter attribute is Missing.") errHandlerProblemDetails(w, "sessionFilter attribute is Missing.", http.StatusBadRequest) return } // else if *bwInfo.RequestType == 1 && len(bwInfo.SessionFilter) == 0 { // log.Error("sessionFilter attribute is Missing.") // errHandlerProblemDetails(w, "sessionFilter attribute is Missing.", http.StatusBadRequest) // return // } if *bwInfo.RequestType == 0 { bwInfo.SessionFilter = nil Loading Loading
go-apps/meep-tm/server/bwm/bwm.go +6 −5 Original line number Diff line number Diff line Loading @@ -941,7 +941,7 @@ func bandwidthAllocationPost(w http.ResponseWriter, r *http.Request) { // verify if the RequestType attribute is 1 for session specific allocation // then SessionFilter should also provided in requested body if *bwInfo.RequestType == 1 && bwInfo.SessionFilter != nil { if *bwInfo.RequestType == 1 && len(bwInfo.SessionFilter) != 0 { for _, flowFilterVal := range bwInfo.SessionFilter { if flowFilterVal.SourceIp == "" && flowFilterVal.SourcePort == nil && flowFilterVal.DstAddress == "" && flowFilterVal.DstPort == nil && flowFilterVal.Protocol == "" { log.Error("At least one of sessionFilter subfields shall be included") Loading @@ -949,11 +949,12 @@ func bandwidthAllocationPost(w http.ResponseWriter, r *http.Request) { return } } } else if *bwInfo.RequestType == 1 && len(bwInfo.SessionFilter) == 0 { log.Error("sessionFilter attribute is Missing.") errHandlerProblemDetails(w, "sessionFilter attribute is Missing.", http.StatusBadRequest) return } // else if *bwInfo.RequestType == 1 && len(bwInfo.SessionFilter) == 0 { // log.Error("sessionFilter attribute is Missing.") // errHandlerProblemDetails(w, "sessionFilter attribute is Missing.", http.StatusBadRequest) // return // } if *bwInfo.RequestType == 0 { bwInfo.SessionFilter = nil Loading