Lavender oil contains a linalool compound that has a strong odour that is detestable to mosquitoes and thus mosquitoes hate the lavender smell.