Don't ignore loopback devices and allow addresses on them being enumerated

This commit is contained in:
Tobias Brunner
2012-09-21 18:16:26 +02:00
parent 9513225e6b
commit aed33805ce
10 changed files with 35 additions and 31 deletions
+1 -1
View File
@@ -517,7 +517,7 @@ METHOD(stroke_list_t, status, void,
enumerator->destroy(enumerator);
enumerator = hydra->kernel_interface->create_address_enumerator(
hydra->kernel_interface, FALSE, FALSE);
hydra->kernel_interface, FALSE, FALSE, FALSE);
fprintf(out, "Listening IP addresses:\n");
while (enumerator->enumerate(enumerator, (void**)&host))
{
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2011 Andreas Steffen
* Copyright (C) 2011 Andreas Steffen
* HSR Hochschule fuer Technik Rapperswil
*
* This program is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@ static bool publish_device_ip_addresses(private_tnc_ifmap_listener_t *this)
bool success = TRUE;
enumerator = hydra->kernel_interface->create_address_enumerator(
hydra->kernel_interface, FALSE, FALSE);
hydra->kernel_interface, FALSE, FALSE, FALSE);
while (enumerator->enumerate(enumerator, &host))
{
if (!this->ifmap->publish_device_ip(this->ifmap, host))
@@ -87,7 +87,7 @@ static bool reload_metadata(private_tnc_ifmap_listener_t *this)
}
}
enumerator->destroy(enumerator);
return success;
}
+1 -1
View File
@@ -136,7 +136,7 @@ static void gather_and_add_endpoints(private_ike_me_t *this, message_t *message)
port = host->get_port(host);
enumerator = hydra->kernel_interface->create_address_enumerator(
hydra->kernel_interface, FALSE, FALSE);
hydra->kernel_interface, FALSE, FALSE, FALSE);
while (enumerator->enumerate(enumerator, (void**)&addr))
{
host = addr->clone(addr);
+1 -1
View File
@@ -192,7 +192,7 @@ static void build_address_list(private_ike_mobike_t *this, message_t *message)
me = this->ike_sa->get_my_host(this->ike_sa);
enumerator = hydra->kernel_interface->create_address_enumerator(
hydra->kernel_interface, FALSE, FALSE);
hydra->kernel_interface, FALSE, FALSE, FALSE);
while (enumerator->enumerate(enumerator, (void**)&host))
{
if (me->ip_equals(me, host))
+1 -1
View File
@@ -341,7 +341,7 @@ METHOD(task_t, build_i, status_t,
else
{ /* 3. */
enumerator = hydra->kernel_interface->create_address_enumerator(
hydra->kernel_interface, FALSE, FALSE);
hydra->kernel_interface, FALSE, FALSE, FALSE);
while (enumerator->enumerate(enumerator, (void**)&host))
{
/* apply port 500 to host, but work on a copy */