diff options
author | Phil Sutter <phil@nwl.cc> | 2019-04-11 12:38:51 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-04-11 20:50:28 +0200 |
commit | 2bb74a7796ea6d7a9df64bb9d3ef57fc31b8d7b7 (patch) | |
tree | d883c800903893c0b8077138092a50d7616e3846 | |
parent | 2ed5afd9f3183f8af2a5347e9f606ae02cd849e3 (diff) |
parser_json: Disallow ct helper as type to map to
When creating a map, users may either map dtype:dtype or dtype:object.
In the second case, only counter, quota, limit and secmark is allowed by
bison, but JSON parser wasn't as strict, allowing ct helper as well.
Remove that to avoid undefined behaviour.
Fixes: 586ad210368b7 ("libnftables: Implement JSON parser")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | src/parser_json.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/parser_json.c b/src/parser_json.c index 19d3ad47..53017935 100644 --- a/src/parser_json.c +++ b/src/parser_json.c @@ -2503,7 +2503,6 @@ static int string_to_nft_object(const char *str) const char *obj_tbl[__NFT_OBJECT_MAX] = { [NFT_OBJECT_COUNTER] = "counter", [NFT_OBJECT_QUOTA] = "quota", - [NFT_OBJECT_CT_HELPER] = "ct helper", [NFT_OBJECT_LIMIT] = "limit", [NFT_OBJECT_SECMARK] = "secmark", }; |