[libnftnl PATCH] expr: exthdr: Display NFT_EXTHDR_F_PRESENT in debug output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This allows to assert it in testsuite also.

Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 src/expr/exthdr.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/expr/exthdr.c b/src/expr/exthdr.c
index 9ed4ae1725ac1..d4f166525dc9e 100644
--- a/src/expr/exthdr.c
+++ b/src/expr/exthdr.c
@@ -301,9 +301,11 @@ static int nftnl_expr_exthdr_snprintf_default(char *buf, size_t len,
 					      const struct nftnl_expr *e)
 {
 	struct nftnl_expr_exthdr *exthdr = nftnl_expr_data(e);
-	return snprintf(buf, len, "load%s %ub @ %u + %u => reg %u ",
+	return snprintf(buf, len, "load%s %ub @ %u + %u%s => reg %u ",
 			op2str(exthdr->op), exthdr->len, exthdr->type,
-			exthdr->offset, exthdr->dreg);
+			exthdr->offset,
+			exthdr->flags & NFT_EXTHDR_F_PRESENT ? " present" : "",
+			exthdr->dreg);
 }
 
 static int
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux