From 100d3ec82ba5886533f5880e2059682318eefab9 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Sun, 19 Feb 2017 23:15:55 +0100 Subject: 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 --- src/netlink.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/netlink.c b/src/netlink.c index 2ff9afce..fb6d2876 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; } -- cgit v1.2.3