Code earlier in this function validated that gm->type is valid, so
the default case at the end of the function would be impossible, but
since the code can change or perhaps get copied, return the correct
error to keep consistency and avoid reintroducing the bug fixed by
commit
09d4b951636b ("ofp-util: Reject bad group type and command
with error instead of abort.")
Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
}
break;
default:
- OVS_NOT_REACHED();
+ /* Returning BAD TYPE to be consistent
+ * though gm->type has been checked already. */
+ return OFPERR_OFPGMFC_BAD_TYPE;
}
}