* [PATCH nft] datatype: display description for header field < 8 bits
@ 2019-10-09 20:48 Pablo Neira Ayuso
0 siblings, 0 replies; only message in thread
From: Pablo Neira Ayuso @ 2019-10-09 20:48 UTC (permalink / raw)
To: netfilter-devel
# nft describe ip dscp
payload expression, datatype dscp (Differentiated Services Code Point) (basetype integer), 6 bits
pre-defined symbolic constants (in hexadecimal):
nft: datatype.c:209: switch_byteorder: Assertion `len > 0' failed.
Aborted
Fixes: c89a0801d077 ("datatype: Display pre-defined inet_service values in host byte order")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/datatype.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/datatype.c b/src/datatype.c
index 873f7d4d358b..0ee2925a8368 100644
--- a/src/datatype.c
+++ b/src/datatype.c
@@ -220,6 +220,9 @@ void symbol_table_print(const struct symbol_table *tbl,
unsigned int len = dtype->size / BITS_PER_BYTE;
uint64_t value;
+ if (!len)
+ len = 1;
+
for (s = tbl->symbols; s->identifier != NULL; s++) {
value = s->value;
--
2.11.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-09 20:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 20:48 [PATCH nft] datatype: display description for header field < 8 bits 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).