netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH nft 3/7] netlink: BUG when object type is unknown
Date: Mon, 27 Feb 2017 16:02:51 +0100	[thread overview]
Message-ID: <20170227150255.12624-4-fw@strlen.de> (raw)
In-Reply-To: <20170227150255.12624-1-fw@strlen.de>

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>
---
 src/netlink.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/netlink.c b/src/netlink.c
index 1f3398225892..d2ede2a47c5d 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;
 }
-- 
2.10.2


  parent reply	other threads:[~2017-02-27 16:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 15:02 [PATCH 0/7] nftables: add ct helper set support Florian Westphal
2017-02-27 15:02 ` [PATCH libnftnl 1/7] object: extend set/get api for u8/u16 types Florian Westphal
2017-02-27 15:02 ` [PATCH libnftnl 2/7] src: ct helper support Florian Westphal
2017-02-27 15:02 ` Florian Westphal [this message]
2017-02-27 15:02 ` [PATCH nft 4/7] src: add initial " Florian Westphal
2017-02-27 15:02 ` [PATCH nft 5/7] evaluate: refactor CMD_OBJ_QUOTA/COUNTER handling Florian Westphal
2017-02-27 15:02 ` [PATCH nft 6/7] src: allow listing all ct helpers Florian Westphal
2017-02-27 15:02 ` [PATCH nft 7/7] src: implement add/create/delete for ct helper objects Florian Westphal
2017-02-28 11:30 ` [PATCH 0/7] nftables: add ct helper set support Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170227150255.12624-4-fw@strlen.de \
    --to=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).