@@ -280,7 +280,7 @@ func checkDefaultSvcIsolationOVSFlows(flows []string, defaultConfig *bridgeUDNCo
280280 Expect (nTable2Flows ).To (Equal (1 ))
281281}
282282
283- func checkAdvertisedUDNSvcIsolationOVSFlows (flows []string , netConfig * bridgeUDNConfiguration , netName , bridgeMAC string , svcCIDR * net.IPNet , expectedNFlows int ) {
283+ func checkAdvertisedUDNSvcIsolationOVSFlows (flows []string , netConfig * bridgeUDNConfiguration , netName string , svcCIDR * net.IPNet , expectedNFlows int ) {
284284 By (fmt .Sprintf ("Checking advertsised UDN %s service isolation flows for %s; expected %d flows" ,
285285 netName , svcCIDR .String (), expectedNFlows ))
286286
@@ -303,8 +303,8 @@ func checkAdvertisedUDNSvcIsolationOVSFlows(flows []string, netConfig *bridgeUDN
303303
304304 var nFlows int
305305 for _ , flow := range flows {
306- if strings .Contains (flow , fmt .Sprintf ("priority=200, table=2, %s, %s_src=%s, actions=set_field:%s->eth_dst,output:%s " ,
307- protoPrefix , protoPrefix , matchingIPFamilySubnet , bridgeMAC , netConfig . ofPortPatch )) {
306+ if strings .Contains (flow , fmt .Sprintf ("priority=200, table=2, %s, %s_src=%s, actions=drop " ,
307+ protoPrefix , protoPrefix , matchingIPFamilySubnet )) {
308308 nFlows ++
309309 }
310310 if strings .Contains (flow , fmt .Sprintf ("priority=550, in_port=LOCAL, %s, %s_src=%s, %s_dst=%s, actions=ct(commit,zone=64001,table=2)" ,
@@ -316,7 +316,7 @@ func checkAdvertisedUDNSvcIsolationOVSFlows(flows []string, netConfig *bridgeUDN
316316 Expect (nFlows ).To (Equal (expectedNFlows ))
317317}
318318
319- func checkUDNSvcIsolationOVSFlows (flows []string , netConfig * bridgeUDNConfiguration , netName , bridgeMAC string , svcCIDR * net.IPNet , expectedNFlows int ) {
319+ func checkUDNSvcIsolationOVSFlows (flows []string , netConfig * bridgeUDNConfiguration , netName string , svcCIDR * net.IPNet , expectedNFlows int ) {
320320 By (fmt .Sprintf ("Checking UDN %s service isolation flows for %s; expected %d flows" ,
321321 netName , svcCIDR .String (), expectedNFlows ))
322322
@@ -332,8 +332,8 @@ func checkUDNSvcIsolationOVSFlows(flows []string, netConfig *bridgeUDNConfigurat
332332
333333 var nFlows int
334334 for _ , flow := range flows {
335- if strings .Contains (flow , fmt .Sprintf ("priority=200, table=2, %s, %s_src=%s, actions=set_field:%s->eth_dst,output:%s " ,
336- protoPrefix , protoPrefix , mgmtMasqIP , bridgeMAC , netConfig . ofPortPatch )) {
335+ if strings .Contains (flow , fmt .Sprintf ("priority=200, table=2, %s, %s_src=%s, actions=drop " ,
336+ protoPrefix , protoPrefix , mgmtMasqIP )) {
337337 nFlows ++
338338 }
339339 }
@@ -797,7 +797,7 @@ var _ = Describe("UserDefinedNetworkGateway", func() {
797797 checkDefaultSvcIsolationOVSFlows (flowMap ["DEFAULT" ], defaultUdnConfig , ofPortHost , bridgeMAC , svcCIDR )
798798
799799 // Expect exactly one flow per UDN for table 2 for service isolation.
800- checkUDNSvcIsolationOVSFlows (flowMap ["DEFAULT" ], bridgeUdnConfig , "bluenet" , bridgeMAC , svcCIDR , 1 )
800+ checkUDNSvcIsolationOVSFlows (flowMap ["DEFAULT" ], bridgeUdnConfig , "bluenet" , svcCIDR , 1 )
801801 }
802802
803803 // The second call to checkPorts() will return no ofPort for the UDN - simulating a deletion that already was
@@ -827,7 +827,7 @@ var _ = Describe("UserDefinedNetworkGateway", func() {
827827 checkDefaultSvcIsolationOVSFlows (flowMap ["DEFAULT" ], defaultUdnConfig , ofPortHost , bridgeMAC , svcCIDR )
828828
829829 // Expect no more flows per UDN for table 2 for service isolation.
830- checkUDNSvcIsolationOVSFlows (flowMap ["DEFAULT" ], bridgeUdnConfig , "bluenet" , bridgeMAC , svcCIDR , 0 )
830+ checkUDNSvcIsolationOVSFlows (flowMap ["DEFAULT" ], bridgeUdnConfig , "bluenet" , svcCIDR , 0 )
831831 }
832832 return nil
833833 })
@@ -1028,7 +1028,7 @@ var _ = Describe("UserDefinedNetworkGateway", func() {
10281028 checkDefaultSvcIsolationOVSFlows (flowMap ["DEFAULT" ], defaultUdnConfig , ofPortHost , bridgeMAC , svcCIDR )
10291029
10301030 // Expect exactly one flow per UDN for tables 0 and 2 for service isolation.
1031- checkUDNSvcIsolationOVSFlows (flowMap ["DEFAULT" ], bridgeUdnConfig , "bluenet" , bridgeMAC , svcCIDR , 1 )
1031+ checkUDNSvcIsolationOVSFlows (flowMap ["DEFAULT" ], bridgeUdnConfig , "bluenet" , svcCIDR , 1 )
10321032 }
10331033
10341034 // The second call to checkPorts() will return no ofPort for the UDN - simulating a deletion that already was
@@ -1058,7 +1058,7 @@ var _ = Describe("UserDefinedNetworkGateway", func() {
10581058 checkDefaultSvcIsolationOVSFlows (flowMap ["DEFAULT" ], defaultUdnConfig , ofPortHost , bridgeMAC , svcCIDR )
10591059
10601060 // Expect no more flows per UDN for tables 0 and 2 for service isolation.
1061- checkUDNSvcIsolationOVSFlows (flowMap ["DEFAULT" ], bridgeUdnConfig , "bluenet" , bridgeMAC , svcCIDR , 0 )
1061+ checkUDNSvcIsolationOVSFlows (flowMap ["DEFAULT" ], bridgeUdnConfig , "bluenet" , svcCIDR , 0 )
10621062 }
10631063 return nil
10641064 })
@@ -1269,7 +1269,7 @@ var _ = Describe("UserDefinedNetworkGateway", func() {
12691269 checkDefaultSvcIsolationOVSFlows (flowMap ["DEFAULT" ], defaultUdnConfig , ofPortHost , bridgeMAC , svcCIDR )
12701270
12711271 // Expect exactly one flow per advertised UDN for table 2 and table 0 for service isolation.
1272- checkAdvertisedUDNSvcIsolationOVSFlows (flowMap ["DEFAULT" ], bridgeUdnConfig , "bluenet" , bridgeMAC , svcCIDR , 2 )
1272+ checkAdvertisedUDNSvcIsolationOVSFlows (flowMap ["DEFAULT" ], bridgeUdnConfig , "bluenet" , svcCIDR , 2 )
12731273 }
12741274
12751275 // The second call to checkPorts() will return no ofPort for the UDN - simulating a deletion that already was
@@ -1299,7 +1299,7 @@ var _ = Describe("UserDefinedNetworkGateway", func() {
12991299 checkDefaultSvcIsolationOVSFlows (flowMap ["DEFAULT" ], defaultUdnConfig , ofPortHost , bridgeMAC , svcCIDR )
13001300
13011301 // Expect no more flows per UDN for table 2 and table0 for service isolation.
1302- checkAdvertisedUDNSvcIsolationOVSFlows (flowMap ["DEFAULT" ], bridgeUdnConfig , "bluenet" , bridgeMAC , svcCIDR , 0 )
1302+ checkAdvertisedUDNSvcIsolationOVSFlows (flowMap ["DEFAULT" ], bridgeUdnConfig , "bluenet" , svcCIDR , 0 )
13031303 }
13041304 return nil
13051305 })
0 commit comments