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
wireguard-tools: call jsonfilter just once #12344
Conversation
Eliminate the extra call to jsonfilter to enumerate active WireGuard interfaces to avoid potential bugs and be more efficient. This change was originally proposed by @pputerla in openwrt#11649 as a workaround for openwrt#8703. Since 22.03.2 the issue seems to be fixed so @pputerla closed the pull request, but I think it's still very worth it as it is more efficient and robust. Signed-off-by: Rio <riobard@users.noreply.github.com>
@riobard please see the CI complaining about formalities. |
@aparcar Thanks for the reminder! As I see it, the only complain is about lacking my real name. Is it strictly required? I do not want to reveal my real name here due to privacy and safety concerns. I also do not intend to claim any originality of the contribution since it is clearly stated in the commit message that it's someone else's abandoned pull request. I'll be completely fine if someone else can submit the commit instead. Please advise. Thanks! |
Please use the following expression, this will also eliminate the need for the eval $(ubus -S call network.interface dump | jsonfilter -e 'wg_ifaces=@.interface[@.up=true && @.proto="wireguard"].interface') |
013b75ab0598 jsonfilter: drop legacy json-c support 594cfa86469c main: fix spurious premature parse aborts in array mode Fixes: https://bugs.openwrt.org/?task_id=3683 Fixes: #8703 Fixes: #11649 Fixes: #12344 Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 33f15dd)
013b75ab0598 jsonfilter: drop legacy json-c support 594cfa86469c main: fix spurious premature parse aborts in array mode Fixes: https://bugs.openwrt.org/?task_id=3683 Fixes: #8703 Fixes: #11649 Fixes: #12344 Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 33f15dd)
Use a single jsonfilter expression to yield the list of logical wireguard interface names in shell compatible notation. Supersedes: #12344 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
013b75ab0598 jsonfilter: drop legacy json-c support 594cfa86469c main: fix spurious premature parse aborts in array mode Fixes: https://bugs.openwrt.org/?task_id=3683 Fixes: openwrt/openwrt#8703 Fixes: openwrt/openwrt#11649 Fixes: openwrt/openwrt#12344 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
013b75ab0598 jsonfilter: drop legacy json-c support 594cfa86469c main: fix spurious premature parse aborts in array mode Fixes: https://bugs.openwrt.org/?task_id=3683 Fixes: openwrt#8703 Fixes: openwrt#11649 Fixes: openwrt#12344 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Use a single jsonfilter expression to yield the list of logical wireguard interface names in shell compatible notation. Supersedes: openwrt#12344 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
013b75ab0598 jsonfilter: drop legacy json-c support 594cfa86469c main: fix spurious premature parse aborts in array mode Fixes: https://bugs.openwrt.org/?task_id=3683 Fixes: openwrt#8703 Fixes: openwrt#11649 Fixes: openwrt#12344 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Use a single jsonfilter expression to yield the list of logical wireguard interface names in shell compatible notation. Supersedes: openwrt#12344 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
013b75ab0598 jsonfilter: drop legacy json-c support 594cfa86469c main: fix spurious premature parse aborts in array mode Fixes: https://bugs.openwrt.org/?task_id=3683 Fixes: openwrt#8703 Fixes: openwrt#11649 Fixes: openwrt#12344 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Use a single jsonfilter expression to yield the list of logical wireguard interface names in shell compatible notation. Supersedes: openwrt#12344 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
013b75ab0598 jsonfilter: drop legacy json-c support 594cfa86469c main: fix spurious premature parse aborts in array mode Fixes: https://bugs.openwrt.org/?task_id=3683 Fixes: openwrt#8703 Fixes: openwrt#11649 Fixes: openwrt#12344 Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 33f15dd)
013b75ab0598 jsonfilter: drop legacy json-c support 594cfa86469c main: fix spurious premature parse aborts in array mode Fixes: https://bugs.openwrt.org/?task_id=3683 Fixes: openwrt/openwrt#8703 Fixes: openwrt/openwrt#11649 Fixes: openwrt/openwrt#12344 Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 33f15dd6d41873b02eb8895b8886763659f1390c)
013b75ab0598 jsonfilter: drop legacy json-c support 594cfa86469c main: fix spurious premature parse aborts in array mode Fixes: https://bugs.openwrt.org/?task_id=3683 Fixes: openwrt/openwrt#8703 Fixes: openwrt/openwrt#11649 Fixes: openwrt/openwrt#12344 Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 33f15dd6d41873b02eb8895b8886763659f1390c)
Eliminate the extra call to jsonfilter to enumerate active WireGuard interfaces to avoid potential bugs and be more efficient.
This change was originally proposed by @pputerla in #11649 as a workaround for #8703. Since 22.03.2 the issue seems to be fixed so @pputerla closed the pull request, but I think it's still very worth it as it is more efficient and robust.