Skip to contentSkip to conversation

exthdr: Add missing exthdr flags cases

PATCH In review Phil Sutter 2 participants 2 messages Feb 16, 2017 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 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")
---
 src/expr/exthdr.c | 4 ++++
 1 file changed, 4 insertions(+)
src/expr/exthdr.c +4 -0
index 143ad549ee1ea..c44c1a75a5ea9 100644
@@ -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;
 }
Signature · 1 line
2.11.0
maintainer
#1 lore raw
Quoted 2 lines · Phil Sutter

Looks like some chunks went by the board while merging with exthdr->op patch.

I've pushed this one, thanks Phil.