From 8ff254bfa04524084583e2d5d9140277fb7caedf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 7 Sep 2026 22:51:35 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=85=20Sync=202026-09-07=2022:51:35?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luci-app-fwlive/Makefile | 2 +- luci-app-fwlive/root/usr/libexec/rpcd/fwlive | 23 +++++++++++++++----- proot/Makefile | 4 ++-- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/luci-app-fwlive/Makefile b/luci-app-fwlive/Makefile index c8f1fd6a..97c4c219 100644 --- a/luci-app-fwlive/Makefile +++ b/luci-app-fwlive/Makefile @@ -12,7 +12,7 @@ LUCI_DEPENDS:=+luci-base +logd +jsonfilter LUCI_PKGARCH:=all PKG_VERSION:=0.1.38 -PKG_RELEASE:=9 +PKG_RELEASE:=10 # Reproducible build: honor SOURCE_DATE_EPOCH from the build environment (set by docker-sdk.sh / CI). ifdef SOURCE_DATE_EPOCH diff --git a/luci-app-fwlive/root/usr/libexec/rpcd/fwlive b/luci-app-fwlive/root/usr/libexec/rpcd/fwlive index d4175bc6..db38109a 100755 --- a/luci-app-fwlive/root/usr/libexec/rpcd/fwlive +++ b/luci-app-fwlive/root/usr/libexec/rpcd/fwlive @@ -303,6 +303,8 @@ build_rules_map() { if nft_list_ruleset >"$_rules_dump" 2>/dev/null; then map_from_nft_stream labeled <"$_rules_dump" map_from_nft_stream unlabeled <"$_rules_dump" + elif [ -z "$_enrich_error" ]; then + _enrich_error='nft_failed' fi rm -f "$_rules_dump" else @@ -315,6 +317,8 @@ build_rules_map() { if run_with_timeout "$IPTABLES_TIMEOUT" iptables-save >"$_rules_dump" 2>/dev/null; then map_from_iptables_save_stream labeled <"$_rules_dump" map_from_iptables_save_stream unlabeled <"$_rules_dump" + elif [ -z "$_enrich_error" ]; then + _enrich_error='iptables_failed' fi rm -f "$_rules_dump" else @@ -326,6 +330,8 @@ build_rules_map() { if run_with_timeout "$IPTABLES_TIMEOUT" ip6tables-save >"$_rules_dump" 2>/dev/null; then map_from_iptables_save_stream labeled <"$_rules_dump" map_from_iptables_save_stream unlabeled <"$_rules_dump" + elif [ -z "$_enrich_error" ]; then + _enrich_error='ip6tables_failed' fi rm -f "$_rules_dump" elif [ -z "$_enrich_error" ]; then @@ -335,6 +341,9 @@ build_rules_map() { ;; esac + if [ "$backend" = unknown ] && [ -z "$_enrich_error" ]; then + _enrich_error='no_backend' + fi _rules_json="{\"backend\":\"$backend\",\"rules\":{$OUT}" if [ -n "$_enrich_error" ]; then _rules_json="${_rules_json},\"error\":\"${_enrich_error}\"" @@ -425,8 +434,12 @@ fetch_firewall_logs() { input="$1" lines=$(poll_lines_from_input "$input") # lines is numeric-clamped; stream/oneshot are fixed (not caller-controlled). - raw=$(ubus call log read "{\"lines\":$lines,\"stream\":false,\"oneshot\":true}" 2>/dev/null) \ - || raw='{"log":[]}' + # A dead logd must not look like an empty firewall table (#303): return a + # structured error instead of filtering an empty fallback into {"log":[]}. + if ! raw=$(ubus call log read "{\"lines\":$lines,\"stream\":false,\"oneshot\":true}" 2>/dev/null); then + printf '%s' '{"log":[],"error":"log_read_failed"}' + return 0 + fi # Do not swallow a filter failure into a silent empty table (#220). # If the filter exits non-zero but still printed JSON, keep it. @@ -437,7 +450,7 @@ fetch_firewall_logs() { out='{"log":[],"error":"filter_failed"}' fi fi - [ -n "$out" ] || out='{"log":[]}' + [ -n "$out" ] || out='{"log":[],"error":"filter_empty"}' printf '%s' "$out" } @@ -591,14 +604,14 @@ resolve_addresses() { OUT='' if ! command -v jshn >/dev/null 2>&1; then - printf '{"names":{}}' + printf '{"names":{},"error":"jshn_missing"}' return 0 fi # shellcheck disable=SC1091 . /usr/share/libubox/jshn.sh json_load "$input" 2>/dev/null || { - printf '{"names":{}}' + printf '{"names":{},"error":"invalid_input"}' return 0 } diff --git a/proot/Makefile b/proot/Makefile index 65ed456a..a1da2d37 100644 --- a/proot/Makefile +++ b/proot/Makefile @@ -3,11 +3,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=proot PKG_VERSION:=5.4.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/proot-me/proot.git -PKG_SOURCE_VERSION:=704a4ab7a41cf5a8bc1f66b0ebdc58cafa72d88c +PKG_SOURCE_VERSION:=53f3955e75074b44adcb15b7f1ff8215f55bf392 include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/python/python3-version.mk