Signed-off-by: Ander Juaristi <[email protected]>
---
 include/linux/netfilter/nf_tables.h | 1 +
 src/expr/dynset.c                   | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/linux/netfilter/nf_tables.h 
b/include/linux/netfilter/nf_tables.h
index 0222d08..75e083e 100644
--- a/include/linux/netfilter/nf_tables.h
+++ b/include/linux/netfilter/nf_tables.h
@@ -636,6 +636,7 @@ enum nft_lookup_attributes {
 enum nft_dynset_ops {
        NFT_DYNSET_OP_ADD,
        NFT_DYNSET_OP_UPDATE,
+       NFT_DYNSET_OP_DELETE,
 };
 
 enum nft_dynset_flags {
diff --git a/src/expr/dynset.c b/src/expr/dynset.c
index 68115ba..4870923 100644
--- a/src/expr/dynset.c
+++ b/src/expr/dynset.c
@@ -208,11 +208,12 @@ nftnl_expr_dynset_parse(struct nftnl_expr *e, struct 
nlattr *attr)
 static const char *op2str_array[] = {
        [NFT_DYNSET_OP_ADD]             = "add",
        [NFT_DYNSET_OP_UPDATE]          = "update",
+       [NFT_DYNSET_OP_DELETE]          = "delete",
 };
 
 static const char *op2str(enum nft_dynset_ops op)
 {
-       if (op > NFT_DYNSET_OP_UPDATE)
+       if (op > NFT_DYNSET_OP_DELETE)
                return "unknown";
        return op2str_array[op];
 }
-- 
2.17.1

Reply via email to