From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: [libnftnl PATCH] exthdr: Add missing exthdr flags cases
Date: Thu, 16 Feb 2017 12:32:24 +0100 [thread overview]
Message-ID: <20170216113224.30193-1-phil@nwl.cc> (raw)
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
next reply other threads:[~2017-02-16 11:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-16 11:32 Phil Sutter [this message]
2017-02-16 12:33 ` [libnftnl PATCH] exthdr: Add missing exthdr flags cases Florian Westphal
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=20170216113224.30193-1-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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).