mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 02:51: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_rules6_dst_bypass_$intf hash:net family inet6 hashsize 64
|
||||
EOF
|
||||
if [ "$(uci -q openmptcprouter.settings.uci_rules)" = "1" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete network.${1}_fw_rule=rule
|
||||
set network.${1}_fw_rule=rule
|
||||
|
@ -191,8 +192,10 @@ _intf_rule() {
|
|||
set network.${1}_fw_rule6.lookup=${count}
|
||||
commit network
|
||||
EOF
|
||||
#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
|
||||
else
|
||||
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
|
||||
iptables-restore --wait=60 --noflush <<-EOF
|
||||
*mangle
|
||||
|
|
Loading…
Reference in a new issue