mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix OMR-Bypass with empty DPI proto
This commit is contained in:
parent
af1694c0dd
commit
beab5cb81f
2 changed files with 8 additions and 3 deletions
|
@ -27,10 +27,14 @@ function bypass_add()
|
|||
ucic:set_list("omr-bypass","ips","ip",ip_ipset)
|
||||
|
||||
local dpi = luci.http.formvalue("cbid.omr-bypass.dpi")
|
||||
if (type(dpi) ~= "table") then
|
||||
dpi = {dpi}
|
||||
if dpi ~= "" then
|
||||
if (type(dpi) ~= "table") then
|
||||
dpi = {dpi}
|
||||
end
|
||||
ucic:set_list("omr-bypass","dpi","proto",dpi)
|
||||
else
|
||||
ucic:delete("omr-bypass","dpi","proto")
|
||||
end
|
||||
ucic:set_list("omr-bypass","dpi","proto",dpi)
|
||||
|
||||
local interface = luci.http.formvalue("cbid.omr-bypass.interface") or ""
|
||||
ucic:set("omr-bypass","defaults","ifname",interface)
|
||||
|
|
|
@ -18,6 +18,7 @@ _bypass_ip() {
|
|||
|
||||
_bypass_proto() {
|
||||
local proto="$1"
|
||||
[ -z "$proto" ] && return
|
||||
ndpi_rules="-A omr-bypass-dpi -m ndpi --$proto -j MARK --set-mark 0x539
|
||||
$ndpi_rules"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue