ike-cfg: remove the to be obsoleted allow any parameter in get_my/other_addr
This commit is contained in:
@@ -135,7 +135,6 @@ METHOD(backend_manager_t, get_ike_cfg, ike_cfg_t*,
|
||||
{
|
||||
ike_cfg_t *current, *found = NULL;
|
||||
char *my_addr, *other_addr;
|
||||
bool my_allow_any, other_allow_any;
|
||||
enumerator_t *enumerator;
|
||||
ike_cfg_match_t match, best = MATCH_ANY;
|
||||
ike_data_t *data;
|
||||
@@ -159,11 +158,10 @@ METHOD(backend_manager_t, get_ike_cfg, ike_cfg_t*,
|
||||
match, me, other, ike_version_names, version);
|
||||
if (match)
|
||||
{
|
||||
my_addr = current->get_my_addr(current, &my_allow_any);
|
||||
other_addr = current->get_other_addr(current, &other_allow_any);
|
||||
DBG2(DBG_CFG, " candidate: %s%s...%s%s, prio %d",
|
||||
my_allow_any ? "%":"", my_addr,
|
||||
other_allow_any ? "%":"", other_addr, match);
|
||||
my_addr = current->get_my_addr(current);
|
||||
other_addr = current->get_other_addr(current);
|
||||
DBG2(DBG_CFG, " candidate: %s...%s, prio %d",
|
||||
my_addr, other_addr, match);
|
||||
if (match > best)
|
||||
{
|
||||
DESTROY_IF(found);
|
||||
@@ -177,11 +175,10 @@ METHOD(backend_manager_t, get_ike_cfg, ike_cfg_t*,
|
||||
this->lock->unlock(this->lock);
|
||||
if (found)
|
||||
{
|
||||
my_addr = found->get_my_addr(found, &my_allow_any);
|
||||
other_addr = found->get_other_addr(found, &other_allow_any);
|
||||
DBG2(DBG_CFG, "found matching ike config: %s%s...%s%s with prio %d",
|
||||
my_allow_any ? "%":"", my_addr,
|
||||
other_allow_any ? "%":"", other_addr, best);
|
||||
my_addr = found->get_my_addr(found);
|
||||
other_addr = found->get_other_addr(found);
|
||||
DBG2(DBG_CFG, "found matching ike config: %s...%s with prio %d",
|
||||
my_addr, other_addr, best);
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
@@ -186,22 +186,14 @@ METHOD(ike_cfg_t, match_other, u_int,
|
||||
}
|
||||
|
||||
METHOD(ike_cfg_t, get_my_addr, char*,
|
||||
private_ike_cfg_t *this, bool *allow_any)
|
||||
private_ike_cfg_t *this)
|
||||
{
|
||||
if (allow_any)
|
||||
{
|
||||
*allow_any = this->my_allow_any;
|
||||
}
|
||||
return this->me;
|
||||
}
|
||||
|
||||
METHOD(ike_cfg_t, get_other_addr, char*,
|
||||
private_ike_cfg_t *this, bool *allow_any)
|
||||
private_ike_cfg_t *this)
|
||||
{
|
||||
if (allow_any)
|
||||
{
|
||||
*allow_any = this->other_allow_any;
|
||||
}
|
||||
return this->other;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,18 +112,16 @@ struct ike_cfg_t {
|
||||
/**
|
||||
* Get own address.
|
||||
*
|
||||
* @param allow_any allow any address to match
|
||||
* @return string of address/DNS name
|
||||
*/
|
||||
char* (*get_my_addr) (ike_cfg_t *this, bool *allow_any);
|
||||
char* (*get_my_addr) (ike_cfg_t *this);
|
||||
|
||||
/**
|
||||
* Get peer's address.
|
||||
*
|
||||
* @param allow_any allow any address to match
|
||||
* @return string of address/DNS name
|
||||
*/
|
||||
char* (*get_other_addr) (ike_cfg_t *this, bool *allow_any);
|
||||
char* (*get_other_addr) (ike_cfg_t *this);
|
||||
|
||||
/**
|
||||
* Get the port to use as our source port.
|
||||
|
||||
Reference in New Issue
Block a user