diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-08-30 12:18:20 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-08-30 12:21:05 +0200 |
commit | aba8b360c344b87945959aaf31f672bf55040a85 (patch) | |
tree | f7e3892d6dd2b9969867aa07f1f5996ddef43e3a /src/expr/hash.c | |
parent | 5b1171ae79674e754e86c5b414202d6e8cfa1890 (diff) |
expr: hash: missing trailing space and modulus in hexadecimal in snprintf
Before patch:
[ hash reg 1 = jhash(reg 2, 8, 3735928559) % modulus 2]
After patch:
[ hash reg 1 = jhash(reg 2, 8, 0xdeadbeef) % mod 2 ]
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expr/hash.c')
-rw-r--r-- | src/expr/hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expr/hash.c b/src/expr/hash.c index a3439d8..2d61508 100644 --- a/src/expr/hash.c +++ b/src/expr/hash.c @@ -235,7 +235,7 @@ nftnl_expr_hash_snprintf_default(char *buf, size_t size, struct nftnl_expr_hash *hash = nftnl_expr_data(e); int len = size, offset = 0, ret; - ret = snprintf(buf, len, "reg %u = jhash(reg %u, %u, %u) %% modulus %u", + ret = snprintf(buf, len, "reg %u = jhash(reg %u, %u, 0x%x) %% mod %u ", hash->dreg, hash->sreg, hash->len, hash->seed, hash->modulus); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); |