Skip to content

Commit

Permalink
ofp-print: Don't abort on unknown reason in role status message.
Browse files Browse the repository at this point in the history
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 <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
  • Loading branch information
blp committed Jul 7, 2017
1 parent 5a48941 commit 94577f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ofp-print.c
Expand Up @@ -2037,7 +2037,8 @@ ofp_print_role_status_message(struct ds *string, const struct ofp_header *oh)
ds_put_cstr(string, "experimenter_data_changed");
break;
default:
OVS_NOT_REACHED();
ds_put_cstr(string, "(unknown)");
break;
}
}

Expand Down

0 comments on commit 94577f4

Please sign in to comment.