Repository navigation
fix: use zone filter values in H3C zone filters; fix two text typos - #1
Open
Avicennasis wants to merge 1 commit into
Open
Avicennasis wants to merge 1 commit into
Avicennasis wants to merge 1 commit into
Conversation
The srcZone and destZone filters in the H3C driver split servicePort instead of the zone value, so filtering by zone never matched (the Fortinet driver already splits srcZone/destZone). Also fix the RequestParams doc comment and the 'Params validated failed' message. Signed-off-by: Léon Avic Simmons <Avicennasis@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
service/pkg/firewall/h3c_v1/h3c_v1.go: behaviour fix, please review as a logic change. The source-zone and destination-zone filters compared the policy's zone list againststrings.Split(servicePort, ",")instead of the zone value the user entered. As a result, filtering H3C policies by zone matched nothing, and every rule was skipped. They now splitsrcZone/destZone, the same as the Fortinet driver (fortinet_v1.go,strings.Split(srcZone, ",")/strings.Split(destZone, ",")).service/pkg/firewall/requests/request.go: the doc comment onRequestParamsstarted withHTTPClient, copied from the struct above it. It now starts withRequestParams.service/router/v1/view.go: error message "Params validated failed" -> "Params validation failed". Only the response text changes; error code1004is unchanged.The
h3c_v1.gochange alters filter behaviour. The other two changes are text only.