* [libnftnl PATCH] expr: exthdr: Display NFT_EXTHDR_F_PRESENT in debug output
@ 2017-03-11 13:27 Phil Sutter
2017-03-13 11:15 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Phil Sutter @ 2017-03-11 13:27 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
This allows to assert it in testsuite also.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [libnftnl PATCH] expr: exthdr: Display NFT_EXTHDR_F_PRESENT in debug output
2017-03-11 13:27 [libnftnl PATCH] expr: exthdr: Display NFT_EXTHDR_F_PRESENT in debug output Phil Sutter
@ 2017-03-13 11:15 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2017-03-13 11:15 UTC (permalink / raw)
To: Phil Sutter; +Cc: netfilter-devel
On Sat, Mar 11, 2017 at 02:27:23PM +0100, Phil Sutter wrote:
> This allows to assert it in testsuite also.
Also applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-13 11:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-11 13:27 [libnftnl PATCH] expr: exthdr: Display NFT_EXTHDR_F_PRESENT in debug output Phil Sutter
2017-03-13 11:15 ` Pablo Neira Ayuso
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).