-
Notifications
You must be signed in to change notification settings - Fork 364
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 incorrect FlowMod message passing in openflow client modifyFlows #5125
Conversation
@@ -450,10 +450,10 @@ func (c *client) modifyFlows(cache *flowCategoryCache, flowCacheKey string, flow | |||
var msg *openflow15.FlowMod | |||
if _, ok := oldFlowCache[matchString]; ok { | |||
msg = getFlowModMessage(flow, binding.ModifyMessage) | |||
adds = append(adds, msg) | |||
mods = append(mods, msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Signed-off-by: Dyanngg <[email protected]>
Yes it seems to be the case.
In my own dev testing (for a feature that's unrelated to released ones), I found out that because of this bug, OVS will fail to add specific flows explicitly passed to the client in update cases, and throw no openflow errors. I added the backport tag because it seems the function is used in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for catching and fixing the issue.
/test-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In the openflow client, the
modifyFlows
function incorrectly flipped theadd
andmod
type ofFlowMod
messages that it passes to the lower levelBundleOps
operation. This could lead to unexpected openflow state for the caller.