Mirror only - Please move to https://github.com/immortalwrt/immortalwrt
Revisão | 99552e0a312f7f30cff99a203e50c6cbd244efbe (tree) |
---|---|
Hora | 2022-01-24 17:41:33 |
Autor | Tianling Shen <cnsztl@immo...> |
Commiter | Tianling Shen |
autocore: sync with upstream source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
@@ -165,7 +165,11 @@ local methods = { | ||
165 | 165 | local ok, fd = pcall(io.open, "/usr/share/fw3/helpers.conf", "r") |
166 | 166 | local rv = {} |
167 | 167 | |
168 | - if ok then | |
168 | + if not (ok and fd) then | |
169 | + ok, fd = pcall(io.open, "/usr/share/firewall4/helpers", "r") | |
170 | + end | |
171 | + | |
172 | + if ok and fd then | |
169 | 173 | local entry |
170 | 174 | |
171 | 175 | while true do |
@@ -209,7 +213,7 @@ local methods = { | ||
209 | 213 | rv.firewall = fs.access("/sbin/fw3") |
210 | 214 | rv.firewall4 = fs.access("/sbin/fw4") |
211 | 215 | rv.opkg = fs.access("/bin/opkg") |
212 | - rv.offloading = fs.access("/sys/module/xt_FLOWOFFLOAD/refcnt") | |
216 | + rv.offloading = fs.access("/sys/module/xt_FLOWOFFLOAD/refcnt") or fs.access("/sys/module/nft_flow_offload/refcnt") | |
213 | 217 | rv.br2684ctl = fs.access("/usr/sbin/br2684ctl") |
214 | 218 | rv.swconfig = fs.access("/sbin/swconfig") |
215 | 219 | rv.odhcpd = fs.access("/usr/sbin/odhcpd") |
@@ -165,7 +165,11 @@ local methods = { | ||
165 | 165 | local ok, fd = pcall(io.open, "/usr/share/fw3/helpers.conf", "r") |
166 | 166 | local rv = {} |
167 | 167 | |
168 | - if ok then | |
168 | + if not (ok and fd) then | |
169 | + ok, fd = pcall(io.open, "/usr/share/firewall4/helpers", "r") | |
170 | + end | |
171 | + | |
172 | + if ok and fd then | |
169 | 173 | local entry |
170 | 174 | |
171 | 175 | while true do |
@@ -209,7 +213,7 @@ local methods = { | ||
209 | 213 | rv.firewall = fs.access("/sbin/fw3") |
210 | 214 | rv.firewall4 = fs.access("/sbin/fw4") |
211 | 215 | rv.opkg = fs.access("/bin/opkg") |
212 | - rv.offloading = fs.access("/sys/module/xt_FLOWOFFLOAD/refcnt") | |
216 | + rv.offloading = fs.access("/sys/module/xt_FLOWOFFLOAD/refcnt") or fs.access("/sys/module/nft_flow_offload/refcnt") | |
213 | 217 | rv.br2684ctl = fs.access("/usr/sbin/br2684ctl") |
214 | 218 | rv.swconfig = fs.access("/sbin/swconfig") |
215 | 219 | rv.odhcpd = fs.access("/usr/sbin/odhcpd") |