ofp-print: Don't abort on unknown reason in role status message.
A buggy or malicious switch could send a role status message with a bad
reason code, which if printed by OVS would cause it to abort.  This fixes
the problem.
Reported-by: Bhargava Shastry
Acked-by: Yi-Hung Wei
@@ -2180,7 +2180,8 @@ ofp_print_role_status_message(struct ds *string, const struct ofp_header *oh)
break;
case OFPCRR_N_REASONS:
default:
- OVS_NOT_REACHED();
+ ds_put_cstr(string, "(unknown)");
+ break;
}
}
