summaryrefslogtreecommitdiffstats
path: root/src/jansson.c
Commit message (Collapse)AuthorAgeFilesLines
* json: fixed some leaks in the json parsing functionÁlvaro Neira Ayuso2013-08-171-4/+17
| | | | | | | | | This patch fixes some leaks in the json parsing function. After this patch, we use nft_jansson_free_root. This function uses json_decref and it decrements the reference count and it releases the node if needed. Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* jansson: Add nft_jansson_family functionÁlvaro Neira Ayuso2013-08-091-0/+18
| | | | | | | Refactor some existing code with the new function nft_jansson_family. Signed-off-by: Alvaro Neira Ayuso Ayuso <alvaroneay@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* jansson: Add helper function for building the tree and use itÁlvaro Neira Ayuso2013-07-311-0/+19
| | | | | | | | Add a helper function that parses and returns the jansson tree, use it in the table parser. Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* table: json: fix returned errno value while parsingPablo Neira Ayuso2013-07-251-11/+6
| | | | | | | Instead of returning ERANGE all the time, let functions set errno accordingly and set EINVAL otherwise. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* table: Add json parser supportÁlvaro Neira Ayuso2013-07-251-0/+79
Add function for parsing tables in format JSON Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>