1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-14 19:41:51 +00:00

Set IPv6 rules in omr-bypass only if IPv6 is enabled

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-03-18 15:45:44 +01:00
parent 2b40d1317b
commit c2d89b0d93

View file

@ -179,7 +179,7 @@ _bypass_lan_ip() {
-A omr-bypass-local -s $ip -j MARK --set-mark 0x539
COMMIT
EOF
elif [ "$valid_ip6" = "ok" ]; then
elif [ "$valid_ip6" = "ok" ] && [ "$disableipv6" = "0" ]; then
ip6tables-restore -w --wait=60 --noflush <<-EOF
*mangle
-A omr-bypass6 -s $ip -j MARK --set-mark 0x6539
@ -198,7 +198,7 @@ _bypass_lan_ip() {
-A omr-bypass-local -s $ip -j MARK --set-mark 0x539$intfid
COMMIT
EOF
elif [ "$valid_ip6" = "ok" ]; then
elif [ "$valid_ip6" = "ok" ] && [ "$disableipv6" = "0" ]; then
ip6tables-restore -w --wait=60 --noflush <<-EOF
*mangle
-A omr-bypass6 -s $ip -j MARK --set-mark 0x6539$intfid