* [libnftnl PATCH] exthdr: Add missing exthdr flags cases
@ 2017-02-16 11:32 Phil Sutter
2017-02-16 12:33 ` Florian Westphal
0 siblings, 1 reply; 2+ messages in thread
From: Phil Sutter @ 2017-02-16 11:32 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
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>
---
src/expr/exthdr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/expr/exthdr.c b/src/expr/exthdr.c
index 143ad549ee1ea..c44c1a75a5ea9 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;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [libnftnl PATCH] exthdr: Add missing exthdr flags cases
2017-02-16 11:32 [libnftnl PATCH] exthdr: Add missing exthdr flags cases Phil Sutter
@ 2017-02-16 12:33 ` Florian Westphal
0 siblings, 0 replies; 2+ messages in thread
From: Florian Westphal @ 2017-02-16 12:33 UTC (permalink / raw)
To: Phil Sutter; +Cc: Pablo Neira Ayuso, netfilter-devel
Phil Sutter <phil@nwl.cc> wrote:
> Looks like some chunks went by the board while merging with exthdr->op
> patch.
I've pushed this one, thanks Phil.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-16 12:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-16 11:32 [libnftnl PATCH] exthdr: Add missing exthdr flags cases Phil Sutter
2017-02-16 12:33 ` Florian Westphal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.