* [PATCH libnftnl] exthdr: tcp option reset support
@ 2022-02-19 13:39 Florian Westphal
0 siblings, 0 replies; only message in thread
From: Florian Westphal @ 2022-02-19 13:39 UTC (permalink / raw)
To: netfilter-devel; +Cc: Florian Westphal
Adds print debug support for tcp reset feature.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
src/expr/exthdr.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/expr/exthdr.c b/src/expr/exthdr.c
index 1b813b1e47c4..625dd5d3d0a4 100644
--- a/src/expr/exthdr.c
+++ b/src/expr/exthdr.c
@@ -247,10 +247,15 @@ nftnl_expr_exthdr_snprintf(char *buf, size_t len,
exthdr->offset,
exthdr->flags & NFT_EXTHDR_F_PRESENT ? " present" : "",
exthdr->dreg);
- else
+ else if (e->flags & (1 << NFTNL_EXPR_EXTHDR_SREG))
return snprintf(buf, len, "write%s reg %u => %ub @ %u + %u ",
op2str(exthdr->op), exthdr->sreg, exthdr->len, exthdr->type,
exthdr->offset);
+ else if (exthdr->op == NFT_EXTHDR_OP_TCPOPT && exthdr->len == 0)
+ return snprintf(buf, len, "reset tcpopt %u ", exthdr->type);
+ else
+ return snprintf(buf, len, "op %u len %u type %u offset %u ",
+ exthdr->op, exthdr->len, exthdr->type, exthdr->offset);
}
--
2.35.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-02-19 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-19 13:39 [PATCH libnftnl] exthdr: tcp option reset support Florian Westphal
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).