]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
netlink: BUG when object type is unknown
authorFlorian Westphal <fw@strlen.de>
Sun, 19 Feb 2017 22:15:55 +0000 (23:15 +0100)
committerFlorian Westphal <fw@strlen.de>
Wed, 8 Mar 2017 15:10:54 +0000 (16:10 +0100)
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>
src/netlink.c

index 2ff9afcefa2077016a8248150046b5102dc91291..fb6d2876a6f12086bae2d0db8ce32a4e862b05f6 100644 (file)
@@ -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;
 }