diff --git a/src/main/java/net/floodlightcontroller/core/internal/Controller.java b/src/main/java/net/floodlightcontroller/core/internal/Controller.java index 3890de045007497e53fa95b7ae350d1b527802d5..a29f16a4a9339ae78cb72fa2448af8f1e2323660 100644 --- a/src/main/java/net/floodlightcontroller/core/internal/Controller.java +++ b/src/main/java/net/floodlightcontroller/core/internal/Controller.java @@ -906,13 +906,13 @@ public class Controller implements IFloodlightProviderService, // case and we don't want to log those spurious errors. shouldLogError = !isBadVendorError; if (isBadVendorError) { - if (state.firstRoleReplyReceived) { + if (state.firstRoleReplyReceived && (role != null)) { log.warn("Received ERROR from sw {} that " +"indicates roles are not supported " +"but we have received a valid " +"role reply earlier", sw); - state.firstRoleReplyReceived = false; } + state.firstRoleReplyReceived = true; sw.deliverRoleRequestNotSupported(error.getXid()); synchronized(roleChanger) { if (sw.role == null && Controller.this.role==Role.SLAVE) {