Don't check interface of inbound message if interfaces are not filtered

We don't have a proper kernel-net interface on Android yet, so the check
for a usable interface does not work there.
This commit is contained in:
Tobias Brunner
2012-09-24 17:12:18 +02:00
parent 64595464b2
commit 2e2feffb67
3 changed files with 19 additions and 7 deletions
+3 -2
View File
@@ -447,8 +447,9 @@ static job_requeue_t receive_packets(private_receiver_t *this)
dst = packet->get_destination(packet);
src = packet->get_source(packet);
if (!hydra->kernel_interface->get_interface(hydra->kernel_interface,
dst, NULL))
if (!hydra->kernel_interface->all_interfaces_usable(hydra->kernel_interface)
&& !hydra->kernel_interface->get_interface(hydra->kernel_interface,
dst, NULL))
{
DBG3(DBG_NET, "received packet from %#H to %#H on ignored interface",
src, dst);