Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3683 - jsonfilter yields unreliable results #8703

openwrt-bot opened this issue Mar 15, 2021 · 1 comment

FS#3683 - jsonfilter yields unreliable results #8703

openwrt-bot opened this issue Mar 15, 2021 · 1 comment
flyspray release/19.07


Copy link

@openwrt-bot openwrt-bot commented Mar 15, 2021


  • 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' <jout1
    => 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' <jout2
    => "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
Copy link

@openwrt-bot openwrt-bot commented May 17, 2021


The problem is caused by a bug in the array parsing. It can be solved with the following patch.

@aparcar aparcar added the release/19.07 label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
flyspray release/19.07
None yet

No branches or pull requests

2 participants