Patchwork [libnftables,03/13] src: expr: change wrong value in data_reg

login
register
mail settings
Submitter Alvaro Neira
Date Aug. 9, 2013, 11:12 a.m.
Message ID <20130809111219.29819.20842.stgit@Ph0enix>
Download mbox | patch
Permalink /patch/265993/
State Accepted
Headers show

Comments

Alvaro Neira - Aug. 9, 2013, 11:12 a.m.
From: Álvaro Neira Ayuso <alvaroneay@gmail.com>

Changed wrong value in data_reg_chain snprintf

Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
---
 src/expr/data_reg.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/src/expr/data_reg.c b/src/expr/data_reg.c
index fceec5a..825e474 100644
--- a/src/expr/data_reg.c
+++ b/src/expr/data_reg.c
@@ -359,8 +359,8 @@  int nft_data_reg_snprintf(char *buf, size_t size, union nft_data_reg *reg,
 		case NFT_RULE_O_JSON:
 			return snprintf(buf, size,
 					"\"data_reg\": { \"type\" : \"chain\", "
-						"\"chain\" : %d"
-					"}", reg->verdict);
+						"\"chain\" : \"%s\""
+					"}", reg->chain);
 		default:
 			break;
 		}