[ONOS-5038] Bug fix for "pending_add" flow rules
Corrects deviceIds when build Nicira extension flow rules. Change-Id: I8dc196d36e5518fe172769b2b957c929a7136d52
Showing
2 changed files
with
4 additions
and
4 deletions
... | @@ -241,8 +241,8 @@ public class OpenstackFloatingIpManager implements OpenstackFloatingIpService { | ... | @@ -241,8 +241,8 @@ public class OpenstackFloatingIpManager implements OpenstackFloatingIpService { |
241 | .setEthDst(associatedVm.mac()) | 241 | .setEthDst(associatedVm.mac()) |
242 | .setIpDst(associatedVm.ipAddresses().stream().findFirst().get()) | 242 | .setIpDst(associatedVm.ipAddresses().stream().findFirst().get()) |
243 | .setTunnelId(Long.valueOf(associatedVm.annotations().value(VXLAN_ID))) | 243 | .setTunnelId(Long.valueOf(associatedVm.annotations().value(VXLAN_ID))) |
244 | - .extension(buildExtension(deviceService, cnodeId, dataIp.get().getIp4Address()), | 244 | + .extension(buildExtension(deviceService, gnodeId, dataIp.get().getIp4Address()), |
245 | - cnodeId) | 245 | + gnodeId) |
246 | .setOutput(nodeService.tunnelPort(gnodeId).get()) | 246 | .setOutput(nodeService.tunnelPort(gnodeId).get()) |
247 | .build(); | 247 | .build(); |
248 | 248 | ... | ... |
... | @@ -316,7 +316,7 @@ public class OpenstackPnatHandler { | ... | @@ -316,7 +316,7 @@ public class OpenstackPnatHandler { |
316 | 316 | ||
317 | tBuilder.setIpSrc(externalIp); | 317 | tBuilder.setIpSrc(externalIp); |
318 | gatewayService.getGatewayNodes().stream().forEach(gateway -> { | 318 | gatewayService.getGatewayNodes().stream().forEach(gateway -> { |
319 | - TrafficTreatment.Builder tmpBuilder = tBuilder; | 319 | + TrafficTreatment.Builder tmpBuilder = DefaultTrafficTreatment.builder(tBuilder.build()); |
320 | tmpBuilder.setOutput(gatewayService.getUplinkPort(gateway.getGatewayDeviceId())); | 320 | tmpBuilder.setOutput(gatewayService.getUplinkPort(gateway.getGatewayDeviceId())); |
321 | ForwardingObjective fo = DefaultForwardingObjective.builder() | 321 | ForwardingObjective fo = DefaultForwardingObjective.builder() |
322 | .withSelector(sBuilder.build()) | 322 | .withSelector(sBuilder.build()) |
... | @@ -376,7 +376,7 @@ public class OpenstackPnatHandler { | ... | @@ -376,7 +376,7 @@ public class OpenstackPnatHandler { |
376 | 376 | ||
377 | gatewayService.getGatewayDeviceIds().stream().forEach(deviceId -> { | 377 | gatewayService.getGatewayDeviceIds().stream().forEach(deviceId -> { |
378 | DeviceId srcDeviceId = srcVm.get().location().deviceId(); | 378 | DeviceId srcDeviceId = srcVm.get().location().deviceId(); |
379 | - TrafficTreatment.Builder tmpBuilder = tBuilder; | 379 | + TrafficTreatment.Builder tmpBuilder = DefaultTrafficTreatment.builder(tBuilder.build()); |
380 | tmpBuilder.extension(RulePopulatorUtil.buildExtension( | 380 | tmpBuilder.extension(RulePopulatorUtil.buildExtension( |
381 | deviceService, | 381 | deviceService, |
382 | deviceId, | 382 | deviceId, | ... | ... |
-
Please register or login to post a comment