mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 11:01:50 +00:00
Fix omr-bypass by interface
This commit is contained in:
parent
1feadc161f
commit
5b0097bef8
1 changed files with 18 additions and 15 deletions
|
@ -178,6 +178,7 @@ _intf_rule() {
|
||||||
create omr_rules_dst_bypass_$intf hash:net hashsize 64
|
create omr_rules_dst_bypass_$intf hash:net hashsize 64
|
||||||
create omr_rules6_dst_bypass_$intf hash:net family inet6 hashsize 64
|
create omr_rules6_dst_bypass_$intf hash:net family inet6 hashsize 64
|
||||||
EOF
|
EOF
|
||||||
|
if [ "$(uci -q openmptcprouter.settings.uci_rules)" = "1" ]; then
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
delete network.${1}_fw_rule=rule
|
delete network.${1}_fw_rule=rule
|
||||||
set network.${1}_fw_rule=rule
|
set network.${1}_fw_rule=rule
|
||||||
|
@ -191,8 +192,10 @@ _intf_rule() {
|
||||||
set network.${1}_fw_rule6.lookup=${count}
|
set network.${1}_fw_rule6.lookup=${count}
|
||||||
commit network
|
commit network
|
||||||
EOF
|
EOF
|
||||||
#ip rule add prio 1 fwmark 0x539$count lookup $count pref 1 > /dev/null 2>&1
|
else
|
||||||
#ip -6 rule add prio 1 fwmark 0x6539$count lookup 6$count > /dev/null 2>&1
|
ip rule add prio 1 fwmark 0x539$count lookup $count pref 1 > /dev/null 2>&1
|
||||||
|
ip -6 rule add prio 1 fwmark 0x6539$count lookup 6$count > /dev/null 2>&1
|
||||||
|
fi
|
||||||
if [ "$(iptables -w 40 -t mangle -L | grep omr_rules_dst_bypass_$intf)" = "" ]; then
|
if [ "$(iptables -w 40 -t mangle -L | grep omr_rules_dst_bypass_$intf)" = "" ]; then
|
||||||
iptables-restore --wait=60 --noflush <<-EOF
|
iptables-restore --wait=60 --noflush <<-EOF
|
||||||
*mangle
|
*mangle
|
||||||
|
|
Loading…
Reference in a new issue