Re: [PATCH nft v4] src: enable json echo output when reading native syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pablo, sorry about the formatting issues.

One thing about your suggestion:

On 4/8/20 13:05, Pablo Neira Ayuso wrote:
if (!ctx->json_root)
                 return;

Checking uniquely for the absence of json_root is not enough as json_echo may have been initialized. In essence, the case the patch is fixing is when json_root is null but json_echo is not, to denote that we want json echo output but have not read json from input.

In addition, v5 will contain a check for json_echo initialization inside monitor.c to avoid re-initializing nft->json_echo when the callback is built again, this happens when reading multiple times from a mnl socket (see mnl.c:433 inside mnl_batch_talk).

Regards.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux