summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-02-19 23:15:55 +0100
committerFlorian Westphal <fw@strlen.de>2017-03-08 16:10:54 +0100
commit100d3ec82ba5886533f5880e2059682318eefab9 (patch)
tree3b0fe185808cb7fe89dd07fe6bab0301c95c1a46
parent2e8b5eaafc13522a6eaf43bae4aca972279f5148 (diff)
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 <fw@strlen.de> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/netlink.c3
1 files changed, 3 insertions, 0 deletions
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;
}