diff options
author | Vytas Dauksa <vytas.dauksa@smoothwall.net> | 2014-01-23 07:37:48 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2014-01-23 07:37:48 +0100 |
commit | b7a5d5e828989b2f32746fe860f4e8b59c332198 (patch) | |
tree | 0b688a660d64831958dbdb9024155e9e2c703145 /lib/print.c | |
parent | 2dfb973c0dcc6d22113e2370f461f1733035baaf (diff) |
print mark & mark mask in hex rather then decimal
modified ipset_print_mark to print in hex rather then decimal and
altered accordingly test cases.
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Diffstat (limited to 'lib/print.c')
-rw-r--r-- | lib/print.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/print.c b/lib/print.c index 8e2924e..f81c074 100644 --- a/lib/print.c +++ b/lib/print.c @@ -514,12 +514,12 @@ ipset_print_mark(char *buf, unsigned int len, assert(buf); assert(len > 0); assert(data); - assert(opt == IPSET_OPT_MARK); + assert(opt == IPSET_OPT_MARK || opt == IPSET_OPT_MARKMASK); - mark = ipset_data_get(data, IPSET_OPT_MARK); + mark = ipset_data_get(data, opt); assert(mark); - size = snprintf(buf, len, "%u", *mark); + size = snprintf(buf, len, "0x%08llx", *mark); SNPRINTF_FAILURE(size, len, offset); return offset; |