Update luci-base.patch

This commit is contained in:
kiddin9 2026-05-09 20:21:17 +08:00 committed by GitHub
parent 025eb95656
commit 9575147695
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,17 +1,17 @@
--- a/luci-base/root/usr/share/rpcd/ucode/luci
+++ b/luci-base/root/usr/share/rpcd/ucode/luci
@@ -223,6 +223,7 @@ const methods = {
@@ -228,6 +228,7 @@ const methods = {
getFeatures: {
call: function() {
+ let kernel_version = popen('echo -n `uname -r`').read('all');
let result = {
firewall: access('/sbin/fw3') == true,
firewall4: access('/sbin/fw4') == true,
@@ -230,7 +231,7 @@ const methods = {
bonding: access('/sys/module/bonding'),
+ const kernel_version = popen('echo -n `uname -r`').read('all');
const has_fw3 = access('/sbin/fw3') == true;
const has_fw4 = access('/sbin/fw4') == true;
const has_ipt_flowoffload = access('/sys/module/xt_FLOWOFFLOAD/refcnt') == true;
@@ -248,7 +249,7 @@ const methods = {
mii_tool: access('/usr/sbin/mii-tool'),
offloading: access('/sys/module/xt_FLOWOFFLOAD/refcnt') == true || access('/sys/module/nft_flow_offload/refcnt') == true,
offloading: (has_fw3 && has_ipt_flowoffload) || (has_fw4 && has_nft_flowoffload),
offloading_hw: has_hw_offloading,
- fullcone: access('/sys/module/xt_FULLCONENAT/refcnt') == true || access('/sys/module/nft_fullcone/refcnt') == true,
+ fullcone: access(`/lib/modules/${kernel_version}/xt_FULLCONENAT.ko`) == true || access(`/lib/modules/${kernel_version}/nft_fullcone.ko`) == true,
br2684ctl: access('/usr/sbin/br2684ctl') == true,