ofp-util: return BAD_TYPE for consistency at ofputil_decode_group_mod().
authorFlavio Leitner <fbl@redhat.com>
Tue, 22 Dec 2015 17:02:31 +0000 (15:02 -0200)
committerBen Pfaff <blp@ovn.org>
Wed, 23 Dec 2015 00:48:57 +0000 (16:48 -0800)
commit896313f3f7d9ac1f97b8127b5a37383bf490f014
treee3a33ab6eba95ba27f03a34e06ffa7a411be29fa
parent3f32cfebcbad9a15e89014b4bbfa308d99d209fd
ofp-util: return BAD_TYPE for consistency at ofputil_decode_group_mod().

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>
lib/ofp-util.c