Skip to content

Commit

Permalink
In netpol egress rules, except rule should be set to "!=" and should …
Browse files Browse the repository at this point in the history
…not be "=="
  • Loading branch information
wangyd1988 authored and hongzhen-ma committed Oct 12, 2021
1 parent 0a09e05 commit 7e775fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ovs/ovn-nbctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ func (c Client) CreateEgressACL(npName, pgName, asEgressName, asExceptName, prot
ovnArgs = append(ovnArgs, allowArgs...)
} else {
for _, port := range npp {
allowArgs := []string{"--", MayExist, "--type=port-group", "acl-add", pgName, "from-lport", util.EgressAllowPriority, fmt.Sprintf("%s.dst == $%s && %s.dst == $%s && %s.dst == %d && %s.src == $%s", ipSuffix, asEgressName, ipSuffix, asExceptName, strings.ToLower(string(*port.Protocol)), port.Port.IntVal, ipSuffix, pgAs), "allow-related"}
allowArgs := []string{"--", MayExist, "--type=port-group", "acl-add", pgName, "from-lport", util.EgressAllowPriority, fmt.Sprintf("%s.dst == $%s && %s.dst != $%s && %s.dst == %d && %s.src == $%s", ipSuffix, asEgressName, ipSuffix, asExceptName, strings.ToLower(string(*port.Protocol)), port.Port.IntVal, ipSuffix, pgAs), "allow-related"}
ovnArgs = append(ovnArgs, allowArgs...)
}
}
Expand Down

0 comments on commit 7e775fa

Please sign in to comment.