Fix the source of iptable rules generated for Ingress NetworkPolicy when both port and IP block specified

This commit is contained in:
Kitt Hsu committed 2019-06-28 15:02:22 +08:00
1 parent b05c5f63c8
commit a547d4571c
2 files changed
+77 -1

No files matched your search

+1 -1
View File
@@ -106,7 +106,7 @@ func (ns *ns) analysePolicy(policy *networkingv1.NetworkPolicy) (
rules[rule.key] = rule
} else {
withNormalisedProtoAndPort(ingressRule.Ports, func(proto, port string) {
rule := newRuleSpec(policyTypeIngress, &proto, srcSelector, targetSelector, &port)
rule := newRuleSpec(policyTypeIngress, &proto, srcRuleHost, targetSelector, &port)
rules[rule.key] = rule
})
}