Skip to content
Snippets Groups Projects
Commit 52310134 authored by Srinivasan Ramasubramanian's avatar Srinivasan Ramasubramanian
Browse files

Fixing a bug where floodlight doesn't provide a floodlight context, resulting...

Fixing a bug where floodlight doesn't provide a floodlight context, resulting in a null-pointer exception.
parent 73da8a33
No related branches found
No related tags found
No related merge requests found
...@@ -492,12 +492,14 @@ public class OFMessageFilterManager implements IOFMessageListener { ...@@ -492,12 +492,14 @@ public class OFMessageFilterManager implements IOFMessageListener {
sb.append("\nbuffer: "); sb.append("\nbuffer: ");
sb.append(pktIn.getBufferId()); sb.append(pktIn.getBufferId());
// If the conext is not set by floodlight, then ignore.
if (cntx != null) {
// packet type icmp, arp, etc. // packet type icmp, arp, etc.
eth = IFloodlightProvider.bcStore.get(cntx, eth = IFloodlightProvider.bcStore.get(cntx,
IFloodlightProvider.CONTEXT_PI_PAYLOAD); IFloodlightProvider.CONTEXT_PI_PAYLOAD);
if (eth != null)
sb.append(eth.toString()); sb.append(eth.toString());
}
break; break;
case PACKET_OUT: case PACKET_OUT:
...@@ -522,13 +524,15 @@ public class OFMessageFilterManager implements IOFMessageListener { ...@@ -522,13 +524,15 @@ public class OFMessageFilterManager implements IOFMessageListener {
sb.append(HexString.toHexString(sw.getId())); sb.append(HexString.toHexString(sw.getId()));
sb.append(" ]"); sb.append(" ]");
eth = new Ethernet(); // If the conext is not set by floodlight, then ignore.
if (cntx != null) {
eth = IFloodlightProvider.bcStore.get(cntx, eth = IFloodlightProvider.bcStore.get(cntx,
IFloodlightProvider.CONTEXT_PI_PAYLOAD); IFloodlightProvider.CONTEXT_PI_PAYLOAD);
sb.append(eth.toString()); if (eth != null)
sb.append(eth.toString());
}
sb.append("ADD: cookie: "); sb.append("\nADD: cookie: ");
sb.append(fm.getCookie()); sb.append(fm.getCookie());
sb.append(" idle: "); sb.append(" idle: ");
sb.append(fm.getIdleTimeout()); sb.append(fm.getIdleTimeout());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment