Skip to content

Commit

Permalink
Revert "fix: ipv6 policy route"
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Jul 6, 2020
1 parent 41ceefd commit 1d13d5c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions pkg/controller/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,6 @@ func (c *Controller) handleAddNode(key string) error {
}

match := fmt.Sprintf("ip4.src==$%s && ip4.dst!=$%s", nodeLocalAddressSet, util.SubnetAddressSet)
if util.CheckProtocol(ip) == kubeovnv1.ProtocolIPv6 {
match = fmt.Sprintf("ip6.src==$%s && ip6.dst!=$%s", nodeLocalAddressSet, util.SubnetAddressSet)
}
if err := c.ovnClient.CreatePolicyRoute(c.config.ClusterRouter, match, ip, util.DistributedGatewayPolicyRoutePriority); err != nil {
klog.Errorf("failed to create policy route for node %s, %v", key, err)
return err
Expand Down
3 changes: 0 additions & 3 deletions pkg/controller/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,9 +702,6 @@ func (c *Controller) reconcileGateway(subnet *kubeovnv1.Subnet) error {
}

match := fmt.Sprintf("ip4.src==%s && ip4.dst!=$%s", subnet.Spec.CIDRBlock, util.SubnetAddressSet)
if subnet.Spec.Protocol == kubeovnv1.ProtocolIPv6 {
match = fmt.Sprintf("ip6.src==$%s && ip6.dst!=$%s", subnet.Spec.CIDRBlock, util.SubnetAddressSet)
}
if err := c.ovnClient.CreatePolicyRoute(c.config.ClusterRouter, match, nodeTunlIPAddr.String(), util.CentralGatewayPolicyRoutePriority); err != nil {
klog.Errorf("failed to create policy route for subnet %s, %v", subnet.Name, err)
return err
Expand Down

0 comments on commit 1d13d5c

Please sign in to comment.