This commit is contained in:
2026-05-23 15:24:34 +08:00
parent 1116384ae8
commit 25474f3901

View File

@@ -35,12 +35,7 @@ add_rules() {
ip rule add to ${subnet} lookup 102 priority $((current_prio + 1)) 2>/dev/null
current_prio=$((current_prio + 2))
done
ip rule add from ${LAN_SUBNET_V4} to ${LAN_SUBNET_V4} lookup 102 priority ${current_prio} 2>/dev/null
current_prio=$((current_prio + 10))
ip -6 rule add from ${TUNNEL_SUBNET_V6} to ${TUNNEL_SUBNET_V6} lookup 102 priority ${BASE_PRIORITY} 2>/dev/null
ip -6 rule add from ${LAN_SUBNET_V6_FD} to ${LAN_SUBNET_V6_FD} lookup 102 priority $((BASE_PRIORITY + 10)) 2>/dev/null
}
del_rules() {
@@ -50,12 +45,7 @@ del_rules() {
ip rule del to ${subnet} lookup 102 priority $((current_prio + 1)) 2>/dev/null
current_prio=$((current_prio + 2))
done
ip rule del from ${LAN_SUBNET_V4} to ${LAN_SUBNET_V4} lookup 102 priority ${current_prio} 2>/dev/null
current_prio=$((current_prio + 10))
ip -6 rule del from ${TUNNEL_SUBNET_V6} to ${TUNNEL_SUBNET_V6} lookup 102 priority ${BASE_PRIORITY} 2>/dev/null
ip -6 rule del from ${LAN_SUBNET_V6_FD} to ${LAN_SUBNET_V6_FD} lookup 102 priority $((BASE_PRIORITY + 10)) 2>/dev/null
}
start() {