diff --git a/.github/diy/patches/luci-base.patch b/.github/diy/patches/luci-base.patch index 77021eda..292b0a16 100644 --- a/.github/diy/patches/luci-base.patch +++ b/.github/diy/patches/luci-base.patch @@ -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,