From: Florian Westphal Date: Sun, 19 Feb 2017 22:15:55 +0000 (+0100) Subject: netlink: BUG when object type is unknown X-Git-Tag: v0.8~212 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=100d3ec82ba5886533f5880e2059682318eefab9;p=thirdparty%2Fnftables.git netlink: BUG when object type is unknown This will only trigger during development when adding new object types to the parser. The BUG() gives a clear hint where the serialization code needs to go. Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso --- diff --git a/src/netlink.c b/src/netlink.c index 2ff9afcef..fb6d2876a 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -317,6 +317,9 @@ alloc_nftnl_obj(const struct handle *h, struct obj *obj) nftnl_obj_set_u32(nlo, NFTNL_OBJ_QUOTA_FLAGS, obj->quota.flags); break; + default: + BUG("Unknown type %d\n", obj->type); + break; } return nlo; }