[FS#3683] jsonfilter yields unreliable results (Attachment added)

OpenWrt Bugs openwrt-bugs at lists.openwrt.org
Mon Mar 15 16:05:19 GMT 2021


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Arnold (arnysch) 

Attached to Project - OpenWrt/LEDE Project
Summary - jsonfilter yields unreliable results
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - openwrt-19.07
Due in Version - Undecided
Due Date - Undecided
Details - - Device is an Arcadyan VGV7510KW22 (o2 Box 6431)
- Box software version is OpenWrt 19.07-SNAPSHOT, r11318-c64742a96e
- Problem shows up in package wireguard_tool which provides script wireguard_watchdog" which uses jsonfilter.
- Short steps to reproduce:

* Use attached file jinp1 as input and run this command:
    jsonfilter -a -e '@[@.proto="wireguard"].interface'   nothing is output (empty output), which is incorrect

* Now use attached file jinp2, which is jinp1 with lines slighty reordered:
    jsonfilter -a -e '@[@.proto="wireguard"].interface'   "wgvpn" is output, which is correct, this time.

- Background: Script wireguard_watchdog tries to identify the WireGuard network interfaces.
  To this end it runs these commands:
  ubus -S call network.interface dump | jsonfilter -e '@.interface[@.up=true]' | jsonfilter -a -e '@[@.proto="wireguard"].interface'
  The second jsonfilter call in this line erroneously does not show a result.
   The attached files jinp1, jinp2 contain example input for the 2nd jsonfilter call
 

One or more files have been attached.

More information can be found at the following URL:
https://bugs.openwrt.org/index.php?do=details&task_id=3683

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the openwrt-bugs mailing list