mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-17 10:21:52 +02:00
Bugfix: filter out msg type other than pkt-in, flow-mod, stat-rep
CPMan only deals with PACKET-IN, FLOW-MOD, STATS-REPLY types for incoming control messages. With other message type, it throws NPE. This commit tries to fix this problem. Change-Id: Iedd264030e404b14d15e33907e082c3d73608baa
This commit is contained in:
parent
8b0ea969eb
commit
7ceb7b024a
@ -38,6 +38,7 @@ import org.onosproject.openflow.controller.OpenFlowSwitchListener;
|
||||
import org.onosproject.openflow.controller.RoleState;
|
||||
import org.projectfloodlight.openflow.protocol.OFMessage;
|
||||
import org.projectfloodlight.openflow.protocol.OFPortStatus;
|
||||
import org.projectfloodlight.openflow.protocol.OFType;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.HashMap;
|
||||
@ -205,7 +206,11 @@ public class OpenFlowControlMessageProvider extends AbstractProvider
|
||||
|
||||
@Override
|
||||
public void handleMessage(Dpid dpid, OFMessage msg) {
|
||||
aggregators.get(dpid).increment(msg);
|
||||
if (msg.getType() == OFType.PACKET_IN ||
|
||||
msg.getType() == OFType.FLOW_MOD ||
|
||||
msg.getType() == OFType.STATS_REPLY) {
|
||||
aggregators.get(dpid).increment(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user