mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-04 19:56:49 +02:00
Fix NPE in OFDPA driver
Change-Id: Iebfff73d88c5cd7a673876af7c58d33e99e895a4
This commit is contained in:
parent
70ce68ebe6
commit
be9f3bc2e9
@ -184,14 +184,16 @@ public class CpqdOfdpa2Pipeline extends Ofdpa2Pipeline {
|
||||
// ofdpa cannot match on ALL portnumber, so we need to use separate
|
||||
// rules for each port.
|
||||
List<PortNumber> portnums = new ArrayList<>();
|
||||
if (portCriterion != null && portCriterion.port() == PortNumber.ALL) {
|
||||
for (Port port : deviceService.getPorts(deviceId)) {
|
||||
if (port.number().toLong() > 0 && port.number().toLong() < OFPP_MAX) {
|
||||
portnums.add(port.number());
|
||||
if (portCriterion != null) {
|
||||
if (portCriterion.port() == PortNumber.ALL) {
|
||||
for (Port port : deviceService.getPorts(deviceId)) {
|
||||
if (port.number().toLong() > 0 && port.number().toLong() < OFPP_MAX) {
|
||||
portnums.add(port.number());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
portnums.add(portCriterion.port());
|
||||
}
|
||||
} else {
|
||||
portnums.add(portCriterion.port());
|
||||
}
|
||||
|
||||
for (PortNumber pnum : portnums) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user