[PATCH libnftnl] exthdr: tcp option reset support

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

 



Adds print debug support for tcp reset feature.

Signed-off-by: Florian Westphal <fw@xxxxxxxxx>
---
 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




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux