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

Squashed commit of the following:

commit 54cf729555
Merge: d45321af 218fb8a6
Author: suyuan <175338101@qq.com>
Date:   Tue Sep 13 14:02:03 2022 +0800

    Merge pull request #273 from Ysurac/develop

    sync

commit 218fb8a6e5
Author: Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
Date:   Mon Sep 12 19:55:17 2022 +0200

    Various small fixes

commit 70571e546b
Author: Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
Date:   Tue Aug 30 21:02:19 2022 +0200

    add a sleep between rmmod for sip alg

commit d7c59fffae
Author: Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
Date:   Tue Aug 30 21:01:54 2022 +0200

    Fix release on upgrade, header and status page

commit 58c4f6cb28
Author: Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
Date:   Mon Aug 29 20:08:59 2022 +0200

    Small SIP ALG fixes

commit 0023879724
Author: Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
Date:   Sat Aug 27 07:50:12 2022 +0200

    Fix SIP ALG
This commit is contained in:
suyuan 2022-09-13 14:02:43 +08:00
parent 7db05f73b1
commit d52a27df67
7 changed files with 41 additions and 16 deletions

View file

@ -181,6 +181,28 @@ start_service() {
rmmod fast_classifier 2>&1 >/dev/null
fi
if [ "$(uci -q get openmptcprouter.settings.sipalg)" = "0" ]; then
uci -q batch <<-EOF >/dev/null
set firewall.zone_lan.auto_helper='0'
set firewall.zone_wan.auto_helper='0'
set firewall.zone_vpn.auto_helper='0'
commit firewall
EOF
rmmod nf_nat_sip 2>&1 >/dev/null
sleep 2
rmmod nf_conntrack_sip 2>&1 >/dev/null
else
uci -q batch <<-EOF >/dev/null
set firewall.zone_lan.auto_helper='1'
set firewall.zone_wan.auto_helper='1'
set firewall.zone_vpn.auto_helper='1'
commit firewall
EOF
modprobe -q nf_conntrack_sip 2>&1 >/dev/null
sleep 2
modprobe -q nf_nat_sip 2>&1 >/dev/null
fi
if [ "$(uci -q get rpcd.@rpcd[0].socket)" != "/var/run/ubus/ubus.sock" ]; then
uci -q batch <<-EOF >/dev/null
set rpcd.@rpcd[0].socket='/var/run/ubus/ubus.sock'