Deepa Vaddireddy
Committed by Thomas Vachuska

Fix for ONOS-2567. Restricting the max out port to 65279

Change-Id: Ic5184d8a389ab5eb4fbe83300764fc39773995cf
......@@ -53,6 +53,8 @@ import com.google.common.collect.Lists;
description = "Installs a number of test flow rules - for testing only")
public class AddTestFlowsCommand extends AbstractShellCommand {
private static final int MAX_OUT_PORT = 65279;
private CountDownLatch latch;
@Argument(index = 0, name = "flowPerDevice", description = "Number of flows to add per device",
......@@ -78,7 +80,7 @@ public class AddTestFlowsCommand extends AbstractShellCommand {
ArrayList<Long> results = Lists.newArrayList();
Iterable<Device> devices = deviceService.getDevices();
TrafficTreatment treatment = DefaultTrafficTreatment.builder()
.setOutput(PortNumber.portNumber(RandomUtils.nextInt())).build();
.setOutput(PortNumber.portNumber(RandomUtils.nextInt(MAX_OUT_PORT))).build();
TrafficSelector.Builder sbuilder;
FlowRuleOperations.Builder rules = FlowRuleOperations.builder();
FlowRuleOperations.Builder remove = FlowRuleOperations.builder();
......