@@ -2515,13 +2515,13 @@ func (c *Controller) addPolicyRouteForU2OInterconn(subnet *kubeovnv1.Subnet) err
2515
2515
U2OexcludeIPAs = u2oExcludeIp6Ag
2516
2516
}
2517
2517
2518
- match1 := fmt .Sprintf ("%s.dst == %s && %s.dst != $%s " , ipSuffix , cidrBlock , ipSuffix , U2OexcludeIPAs )
2518
+ match1 := fmt .Sprintf ("%s.dst == %s" , ipSuffix , cidrBlock )
2519
2519
match2 := fmt .Sprintf ("%s.dst == $%s && %s.src == %s" , ipSuffix , U2OexcludeIPAs , ipSuffix , cidrBlock )
2520
2520
match3 := fmt .Sprintf ("%s.src == %s" , ipSuffix , cidrBlock )
2521
2521
2522
2522
/*
2523
2523
policy1:
2524
- prio 31000 match: "ip4.dst == underlay subnet cidr && ip4.dst != node ips" action: allow
2524
+ prio 29400 match: "ip4.dst == underlay subnet cidr" action: allow
2525
2525
2526
2526
policy2:
2527
2527
prio 31000 match: "ip4.dst == node ips && ip4.src == underlay subnet cidr" action: reroute physical gw
@@ -2536,7 +2536,7 @@ func (c *Controller) addPolicyRouteForU2OInterconn(subnet *kubeovnv1.Subnet) err
2536
2536
action := ovnnb .LogicalRouterPolicyActionAllow
2537
2537
if subnet .Spec .Vpc == c .config .ClusterRouter {
2538
2538
klog .Infof ("add u2o interconnection policy for router: %s, match %s, action %s" , subnet .Spec .Vpc , match1 , action )
2539
- if err := c .ovnClient .AddLogicalRouterPolicy (subnet .Spec .Vpc , util .SubnetRouterPolicyPriority , match1 , action , nil , externalIDs ); err != nil {
2539
+ if err := c .ovnClient .AddLogicalRouterPolicy (subnet .Spec .Vpc , util .U2OSubnetPolicyPriority , match1 , action , nil , externalIDs ); err != nil {
2540
2540
klog .Errorf ("failed to add u2o interconnection policy1 for subnet %s %v" , subnet .Name , err )
2541
2541
return err
2542
2542
}
0 commit comments