Charles Chan
Committed by Charles Chan

ONOS-5259 Fix ClassCastException

Change-Id: I7956d1392f620a5bdb4800bc45bfaef1a03d8e38
......@@ -577,9 +577,9 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
// if we get here, then the error message is for something else
if (m.getErrType() == OFErrorType.BAD_REQUEST &&
(((OFBadRequestErrorMsg) m).getCode() ==
OFBadRequestCode.EPERM) ||
OFBadRequestCode.EPERM ||
((OFBadRequestErrorMsg) m).getCode() ==
OFBadRequestCode.IS_SLAVE) {
OFBadRequestCode.IS_SLAVE)) {
// We are the master controller and the switch returned
// a permission error. This is a likely indicator that
// the switch thinks we are slave. Reassert our
......