Skip to content

Commit e45a297

Browse files
authored
fix underlay access to node through ovn0 (#2847)
1 parent 7e32e57 commit e45a297

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/controller/subnet.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1843,7 +1843,7 @@ func (c *Controller) addPolicyRouteForU2OInterconn(subnet *kubeovnv1.Subnet) err
18431843
prio 31000 match: "ip4.dst == underlay subnet cidr && ip4.dst != node ips" action: allow
18441844
18451845
policy2:
1846-
prio 31000 match: "ip4.dst == node ips && ip4.src == underlay subnet cidr" action: allow
1846+
prio 31000 match: "ip4.dst == node ips && ip4.src == underlay subnet cidr" action: reoute physical gw
18471847
18481848
policy3:
18491849
prio 29000 match: "ip4.src == underlay subnet cidr" action: reroute physical gw
@@ -1858,8 +1858,8 @@ func (c *Controller) addPolicyRouteForU2OInterconn(subnet *kubeovnv1.Subnet) err
18581858
return err
18591859
}
18601860

1861-
klog.Infof("add u2o interconnection policy for router: %s, match %s, action %s", subnet.Spec.Vpc, match2, "allow")
1862-
if err := c.ovnLegacyClient.AddPolicyRoute(subnet.Spec.Vpc, util.SubnetRouterPolicyPriority, match2, "allow", "", externalIDs); err != nil {
1861+
klog.Infof("add u2o interconnection policy for router: %s, match %s, action %s, nexthop %s", subnet.Spec.Vpc, match2, "reroute", nextHop)
1862+
if err := c.ovnLegacyClient.AddPolicyRoute(subnet.Spec.Vpc, util.SubnetRouterPolicyPriority, match2, "reroute", nextHop, externalIDs); err != nil {
18631863
klog.Errorf("failed to add u2o interconnection policy2 for subnet %s %v", subnet.Name, err)
18641864
return err
18651865
}

0 commit comments

Comments
 (0)