diff options
author | Phil Sutter <phil@nwl.cc> | 2019-04-02 15:34:43 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-04-03 19:58:49 +0200 |
commit | 50b5b71ebeee33b725d44ab4487d5d257f9ca4c0 (patch) | |
tree | f3c8f4dd6809645a71921359d0229c8ae2bca3c8 /src/iface.c | |
parent | f01940d69e2a4d8e9e151da8d4d39f78d08528cf (diff) |
parser_json: Rewrite echo support
Instead of guessing which object to update with retrieved handle,
introduce a list containing struct cmd <-> json_t associations. Upon
batch commit, allocated cmd objects are assigned a unique netlink
sequence number. Monitor events contain that number as well, so they may
be associated to the cmd object which triggered them. Using
json_cmd_assoc list the event may in turn be associated to the input's
JSON object which should receive the handle value.
This also fixes incorrect behaviour if JSON input contained "insert"
commands.
Fixes: bb32d8db9a125 ("JSON: Add support for echo option")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/iface.c')
0 files changed, 0 insertions, 0 deletions