@@ -1856,16 +1856,16 @@ func (c *Controller) addPolicyRouteForU2OInterconn(subnet *kubeovnv1.Subnet) err
1856
1856
U2OexcludeIPAs = u2oExcludeIp6Ag
1857
1857
}
1858
1858
1859
- match1 := fmt .Sprintf ("%s.dst == %s && %s.dst != $%s " , ipSuffix , cidrBlock , ipSuffix , U2OexcludeIPAs )
1859
+ match1 := fmt .Sprintf ("%s.dst == %s" , ipSuffix , cidrBlock )
1860
1860
match2 := fmt .Sprintf ("%s.dst == $%s && %s.src == %s" , ipSuffix , U2OexcludeIPAs , ipSuffix , cidrBlock )
1861
1861
match3 := fmt .Sprintf ("%s.src == %s" , ipSuffix , cidrBlock )
1862
1862
1863
1863
/*
1864
1864
policy1:
1865
- prio 31000 match: "ip4.dst == underlay subnet cidr && ip4.dst != node ips" action: allow
1865
+ prio 29400 match: "ip4.dst == underlay subnet cidr" action: allow
1866
1866
1867
1867
policy2:
1868
- prio 31000 match: "ip4.dst == node ips && ip4.src == underlay subnet cidr" action: reoute physical gw
1868
+ prio 31000 match: "ip4.dst == node ips && ip4.src == underlay subnet cidr" action: reroute physical gw
1869
1869
1870
1870
policy3:
1871
1871
prio 29000 match: "ip4.src == underlay subnet cidr" action: reroute physical gw
@@ -1875,7 +1875,7 @@ func (c *Controller) addPolicyRouteForU2OInterconn(subnet *kubeovnv1.Subnet) err
1875
1875
policy3: underlay pod first access u2o interconnection lrp and then reoute to physical gw
1876
1876
*/
1877
1877
klog .Infof ("add u2o interconnection policy for router: %s, match %s, action %s" , subnet .Spec .Vpc , match1 , "allow" )
1878
- if err := c .ovnLegacyClient .AddPolicyRoute (subnet .Spec .Vpc , util .SubnetRouterPolicyPriority , match1 , "allow" , "" , externalIDs ); err != nil {
1878
+ if err := c .ovnLegacyClient .AddPolicyRoute (subnet .Spec .Vpc , util .U2OSubnetPolicyPriority , match1 , "allow" , "" , externalIDs ); err != nil {
1879
1879
klog .Errorf ("failed to add u2o interconnection policy1 for subnet %s %v" , subnet .Name , err )
1880
1880
return err
1881
1881
}
0 commit comments