Skip to content

Commit

Permalink
fix(network_policy): mask mark reset on FW marks (#992)
Browse files Browse the repository at this point in the history
Don't resent all marks, only the mark that we originally set as part of
the firewall rules so that we don't affect other systems like hostPort
and other elements of the nat chain that may apply their own marks.
  • Loading branch information
aauren committed Sep 25, 2020
1 parent 824614d commit 5a5e835
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controllers/netpol/network_policy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ func (npc *NetworkPolicyController) syncPodFirewallChains(networkPoliciesInfo []
}

// reset mark to let traffic pass through rest of the chains
args = []string{"-j", "MARK", "--set-mark", "0"}
args = []string{"-j", "MARK", "--set-mark", "0/0x10000"}
err = iptablesCmdHandler.AppendUnique("filter", podFwChainName, args...)
if err != nil {
return fmt.Errorf("Failed to run iptables command: %s", err.Error())
Expand Down

0 comments on commit 5a5e835

Please sign in to comment.