Fix a critical bug that was introduced by
commit 320a546843b740e2352c25a9e691f824d2a058fd
and prevented writing the flow state to the switches.
NOTE: This is NOT the original critical bug 248
diff --git a/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java b/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
index d55979e..d64476d 100644
--- a/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
+++ b/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
@@ -101,12 +101,13 @@
for (IFlowEntry flowEntryObj : allFlowEntries) {
FlowEntryId flowEntryId =
new FlowEntryId(flowEntryObj.getFlowEntryId());
- String userState = "User State: " + flowEntryObj.getUserState();
- String switchState = "Switch State: " + flowEntryObj.getSwitchState();
+ String userState = flowEntryObj.getUserState();
+ String switchState = flowEntryObj.getSwitchState();
log.debug("Found Flow Entry {}: {}",
flowEntryId.toString(),
- userState + " " + switchState);
+ "User State: " + userState +
+ " Switch State: " + switchState);
if (! switchState.equals("FE_SWITCH_NOT_UPDATED")) {
// Ignore the entry: nothing to do
@@ -160,6 +161,8 @@
flowModCommand = OFFlowMod.OFPFC_DELETE_STRICT;
} else {
// Unknown user state. Ignore the entry
+ log.debug("Flow Entry ignored (FlowEntryId = {}): unknown user state {}",
+ flowEntryId.toString(), userState);
continue;
}