@@ -2212,13 +2212,13 @@ func (c *Controller) addPolicyRouteForU2OInterconn(subnet *kubeovnv1.Subnet) err
2212
2212
U2OexcludeIPAs = u2oExcludeIp6Ag
2213
2213
}
2214
2214
2215
- match1 := fmt .Sprintf ("%s.dst == %s && %s.dst != $%s " , ipSuffix , cidrBlock , ipSuffix , U2OexcludeIPAs )
2215
+ match1 := fmt .Sprintf ("%s.dst == %s" , ipSuffix , cidrBlock )
2216
2216
match2 := fmt .Sprintf ("%s.dst == $%s && %s.src == %s" , ipSuffix , U2OexcludeIPAs , ipSuffix , cidrBlock )
2217
2217
match3 := fmt .Sprintf ("%s.src == %s" , ipSuffix , cidrBlock )
2218
2218
2219
2219
/*
2220
2220
policy1:
2221
- prio 31000 match: "ip4.dst == underlay subnet cidr && ip4.dst != node ips" action: allow
2221
+ prio 29400 match: "ip4.dst == underlay subnet cidr" action: allow
2222
2222
2223
2223
policy2:
2224
2224
prio 31000 match: "ip4.dst == node ips && ip4.src == underlay subnet cidr" action: reroute physical gw
@@ -2233,7 +2233,7 @@ func (c *Controller) addPolicyRouteForU2OInterconn(subnet *kubeovnv1.Subnet) err
2233
2233
2234
2234
if subnet .Spec .Vpc == c .config .ClusterRouter {
2235
2235
klog .Infof ("add u2o interconnection policy for router: %s, match %s, action %s" , subnet .Spec .Vpc , match1 , "allow" )
2236
- if err := c .ovnLegacyClient .AddPolicyRoute (subnet .Spec .Vpc , util .SubnetRouterPolicyPriority , match1 , "allow" , "" , externalIDs ); err != nil {
2236
+ if err := c .ovnLegacyClient .AddPolicyRoute (subnet .Spec .Vpc , util .U2OSubnetPolicyPriority , match1 , "allow" , "" , externalIDs ); err != nil {
2237
2237
klog .Errorf ("failed to add u2o interconnection policy1 for subnet %s %v" , subnet .Name , err )
2238
2238
return err
2239
2239
}
0 commit comments