diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ipset_hash_ipmark.c | 2 | ||||
-rw-r--r-- | lib/print.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/ipset_hash_ipmark.c b/lib/ipset_hash_ipmark.c index fdea32f..922e6c0 100644 --- a/lib/ipset_hash_ipmark.c +++ b/lib/ipset_hash_ipmark.c @@ -28,7 +28,7 @@ static const struct ipset_arg hash_ipmark_create_args0[] = { }, { .name = { "markmask", NULL }, .has_arg = IPSET_MANDATORY_ARG, .opt = IPSET_OPT_MARKMASK, - .parse = ipset_parse_uint32, .print = ipset_print_number, + .parse = ipset_parse_uint32, .print = ipset_print_mark, }, { .name = { "hashsize", NULL }, .has_arg = IPSET_MANDATORY_ARG, .opt = IPSET_OPT_HASHSIZE, 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; |