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

Revert "Merge branch 'test' into ipq60xx"

This reverts commit ab32ce3f57, reversing
changes made to 27f4bbf92a.
This commit is contained in:
suyuan 2023-07-05 01:40:09 +08:00
parent ed27050d9b
commit 51fd4964fc
15 changed files with 20644 additions and 18 deletions

View file

@ -6,7 +6,7 @@ if [ -f /usr/sbin/iptables-legacy ]; then
IPTABLESRESTORE="/usr/sbin/iptables-legacy-restore"
else
IPTABLESSAVE="/usr/sbin/iptables-save"
IPTABLESRESTORE="/usr/sbin/iptables-restore --noflush"
IPTABLESRESTORE="/usr/sbin/iptables-restore"
fi
_setup_rules() {
@ -39,7 +39,7 @@ _setup_fw() {
[ -n "$ifnames" ] && rule="$rule -i $(echo "${ifnames}" | sed 's/ /-i /g')"
if [ -n "$rule" ] && [ -n "$lookup" ]; then
$IPTABLESAVE --counters | grep -v "0x${lookup}" | $IPTABLERESTORE -w --counters
$IPTABLERESTORE <<-EOF
$IPTABLERESTORE --noflush <<-EOF
*mangle
-A omr-gre-tunnel ${rule} -j MARK --set-mark 0x${lookup}
COMMIT
@ -48,7 +48,7 @@ _setup_fw() {
}
if [ -z "$($IPTABLESAVE | grep omr-gre-tunnel)" ]; then
$IPTABLERESTORE <<-EOF
$IPTABLERESTORE --noflush <<-EOF
*mangle
:omr-gre-tunnel -
-I PREROUTING 1 -m addrtype ! --dst-type LOCAL -j omr-gre-tunnel

View file

@ -241,7 +241,9 @@ done
uci -q batch <<-EOF >/dev/null
set firewall.zone_lan.mtu_fix='1'
set firewall.zone_vpn.mtu_fix='0'
set firewall.zone_vpn.mtu_fix='1'
EOF
uci -q batch <<-EOF >/dev/null
set firewall.@include[0].reload='1'
commit firewall
EOF

View file

@ -12,7 +12,7 @@ if [ "$(uci -q get network.omrvpn)" = "" ]; then
set network.omrvpn.leasetime=12h
set network.omrvpn.type=tunnel
set network.omrvpn.txqueuelen=100
set network.omrvpn.metric=9000
set network.omrvpn.metric=1200
commit network
EOF
fi
@ -146,12 +146,7 @@ if [ "$(uci -q get glorytun-udp.vpn.key)" = "" ] && [ "$(uci -q get glorytun.vpn
uci -q commit glorytun-udp
fi
if [ "$(uci -q get network.omrvpn.metric)" = "1200" ]; then
uci -q batch <<-EOF >/dev/null
set network.omrvpn.metric=9000
commit network
EOF
fi
rm -f /tmp/luci-indexcache
exit 0