1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Small SIP ALG fixes

This commit is contained in:
Ycarus (Yannick Chabanois) 2022-08-29 20:08:59 +02:00
parent 0023879724
commit 58c4f6cb28
3 changed files with 3 additions and 12 deletions

View file

@ -1233,16 +1233,6 @@ function settings_add()
-- Enable/disable SIP ALG
local sipalg = luci.http.formvalue("sipalg") or "0"
ucic:set("openmptcprouter","settings","sipalg",sipalg)
ucic:foreach("firewall", "zone", function (section)
ucic:set("firewall",section[".name"],"auto_helper",sipalg)
end)
if sipalg == "1" then
luci.sys.call("modprobe -q nf_conntrack_sip >/dev/null 2>/dev/null")
luci.sys.call("modprobe -q nf_nat_sip >/dev/null 2>/dev/null")
else
luci.sys.call("rmmod nf_nat_sip >/dev/null 2>/dev/null")
luci.sys.call("rmmod nf_conntrack_sip >/dev/null 2>/dev/null")
end
ucic:save("openmptcprouter")
ucic:commit("openmptcprouter")