Skip to content

Commit

Permalink
ignore ip6tabels check for v4 hostIP
Browse files Browse the repository at this point in the history
(cherry picked from commit d9f166b)
  • Loading branch information
hongzhen-ma authored and oilbeater committed Mar 26, 2021
1 parent 35f0649 commit 03956f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/daemon/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ func (c *Controller) setIptables() error {
iptableRules[0], iptableRules[1], iptableRules[3], iptableRules[4] =
iptableRules[4], iptableRules[3], iptableRules[1], iptableRules[0]
for _, iptRule := range iptableRules {
if strings.Contains(strings.Join(iptRule.Rule, " "), "ovn0") && protocol != util.CheckProtocol(hostIP) {
klog.V(3).Infof("ignore check iptable rule, protocol %v, hostIP %v", protocol, hostIP)
continue
}

exists, err := c.iptable[protocol].Exists(iptRule.Table, iptRule.Chain, iptRule.Rule...)
if err != nil {
klog.Errorf("check iptable rule exist failed, %+v", err)
Expand Down

0 comments on commit 03956f1

Please sign in to comment.