summaryrefslogtreecommitdiffstats
path: root/src/expr/exthdr.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2017-02-16 12:32:24 +0100
committerFlorian Westphal <fw@strlen.de>2017-02-16 13:32:04 +0100
commitb270a9d377da0ace919db064c994753efd7a9884 (patch)
tree32d65fe899bfe83864e3eae2aa4c05a760805435 /src/expr/exthdr.c
parent41963763304684e69540049b0b369d5ae22f6331 (diff)
exthdr: Add missing exthdr flags cases
Looks like some chunks went by the board while merging with exthdr->op patch. Fixes: 4196376330468 ("exthdr: Add support for exthdr flags") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/expr/exthdr.c')
-rw-r--r--src/expr/exthdr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/expr/exthdr.c b/src/expr/exthdr.c
index 143ad54..c44c1a7 100644
--- a/src/expr/exthdr.c
+++ b/src/expr/exthdr.c
@@ -292,6 +292,8 @@ static int nftnl_expr_exthdr_export(char *buf, size_t len,
nftnl_buf_u32(&b, type, exthdr->len, LEN);
if (e->flags & (1 << NFTNL_EXPR_EXTHDR_OP))
nftnl_buf_u32(&b, type, exthdr->op, OP);
+ if (e->flags & (1 << NFTNL_EXPR_EXTHDR_FLAGS))
+ nftnl_buf_u32(&b, type, exthdr->flags, FLAGS);
return nftnl_buf_done(&b);
}
@@ -338,6 +340,8 @@ static bool nftnl_expr_exthdr_cmp(const struct nftnl_expr *e1,
eq &= (h1->type == h2->type);
if (e1->flags & (1 << NFTNL_EXPR_EXTHDR_OP))
eq &= (h1->op == h2->op);
+ if (e1->flags & (1 << NFTNL_EXPR_EXTHDR_FLAGS))
+ eq &= (h1->flags == h2->flags);
return eq;
}