summaryrefslogtreecommitdiffstats
path: root/src/expr/reject.c
diff options
context:
space:
mode:
authorAna Rey <anarey@gmail.com>2014-06-04 13:03:31 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2014-06-05 15:23:01 +0200
commita596c41426566f54078f854e138e73a88252e7b9 (patch)
tree89bbeb0b5aa7cf1fb59b20de476ba6a1a3cbc923 /src/expr/reject.c
parentd79329a5e99f4f2fdf293f9e3418cad0af7e7b1d (diff)
expr: log: Do not print unset values in json
It changes the parse and the snprint functions to omit unset values. Also, It fixes an unnecessary comma after key-value pair type. This comma is not necessary if there is not more key-value pairs in this expr. Example: "expr":[{"type":"log"}] If It uses this rule: nft add rule ip test output log It gets this json file: [...] {"expr":[{"type":"log","prefix":"(null)","group":0,"snaplen":0,"qthreshold":0}]} [...] Now, That rule creates this json file without null values: {"expr":[{"type":"log"}]} Signed-off-by: Ana Rey <anarey@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expr/reject.c')
0 files changed, 0 insertions, 0 deletions