Fixed some typos; whitespace cleanup.
This commit is contained in:
@@ -123,7 +123,7 @@ static void build_payloads(private_ike_init_t *this, message_t *message)
|
||||
{
|
||||
proposal_list = this->config->get_proposals(this->config);
|
||||
if (this->old_sa)
|
||||
{
|
||||
{
|
||||
/* include SPI of new IKE_SA when we are rekeying */
|
||||
iterator = proposal_list->create_iterator(proposal_list, TRUE);
|
||||
while (iterator->iterate(iterator, (void**)&proposal))
|
||||
@@ -184,7 +184,7 @@ static void process_payloads(private_ike_init_t *this, message_t *message)
|
||||
proposal_list = sa_payload->get_proposals(sa_payload);
|
||||
this->proposal = this->config->select_proposal(this->config,
|
||||
proposal_list);
|
||||
proposal_list->destroy_offset(proposal_list,
|
||||
proposal_list->destroy_offset(proposal_list,
|
||||
offsetof(proposal_t, destroy));
|
||||
break;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ static void process_payloads(private_ike_init_t *this, message_t *message)
|
||||
vendor_id_payload_t *vendor_id = (vendor_id_payload_t*)payload;
|
||||
chunk_t vid = vendor_id->get_data(vendor_id);
|
||||
|
||||
DBG1(DBG_ENC, "received vendor id: %#B", &vid);
|
||||
DBG1(DBG_ENC, "received vendor id: %#B", &vid);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
@@ -296,7 +296,7 @@ static status_t build_i(private_ike_init_t *this, message_t *message)
|
||||
* Implementation of task_t.process for responder
|
||||
*/
|
||||
static status_t process_r(private_ike_init_t *this, message_t *message)
|
||||
{
|
||||
{
|
||||
rng_t *rng;
|
||||
|
||||
this->config = this->ike_sa->get_ike_cfg(this->ike_sa);
|
||||
@@ -513,7 +513,7 @@ static status_t process_i(private_ike_init_t *this, message_t *message)
|
||||
DBG1(DBG_IKE, "received %N notify error",
|
||||
notify_type_names, type);
|
||||
enumerator->destroy(enumerator);
|
||||
return FAILED;
|
||||
return FAILED;
|
||||
}
|
||||
DBG2(DBG_IKE, "received %N notify",
|
||||
notify_type_names, type);
|
||||
|
||||
@@ -137,7 +137,7 @@ static notify_payload_t *build_natd_payload(private_ike_natd_t *this,
|
||||
notify_type_t type, host_t *host)
|
||||
{
|
||||
chunk_t hash;
|
||||
notify_payload_t *notify;
|
||||
notify_payload_t *notify;
|
||||
ike_sa_id_t *ike_sa_id;
|
||||
ike_cfg_t *config;
|
||||
|
||||
@@ -245,12 +245,12 @@ static void process_payloads(private_ike_natd_t *this, message_t *message)
|
||||
this->ike_sa->set_condition(this->ike_sa, COND_NAT_HERE,
|
||||
!this->dst_matched);
|
||||
this->ike_sa->set_condition(this->ike_sa, COND_NAT_THERE,
|
||||
!this->src_matched);
|
||||
!this->src_matched);
|
||||
config = this->ike_sa->get_ike_cfg(this->ike_sa);
|
||||
if (this->dst_matched && this->src_matched &&
|
||||
config->force_encap(config))
|
||||
{
|
||||
this->ike_sa->set_condition(this->ike_sa, COND_NAT_FAKE, TRUE);
|
||||
this->ike_sa->set_condition(this->ike_sa, COND_NAT_FAKE, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -278,7 +278,7 @@ static status_t process_i(private_ike_natd_t *this, message_t *message)
|
||||
|
||||
if (this->ike_sa->has_condition(this->ike_sa, COND_NAT_ANY) ||
|
||||
#ifdef ME
|
||||
/* if we are on a mediation connection we swith to port 4500 even
|
||||
/* if we are on a mediation connection we switch to port 4500 even
|
||||
* if no NAT is detected. */
|
||||
peer_cfg->is_mediation(peer_cfg) ||
|
||||
#endif /* ME */
|
||||
@@ -406,7 +406,7 @@ static status_t build_r(private_ike_natd_t *this, message_t *message)
|
||||
* Implementation of task_t.process for responder
|
||||
*/
|
||||
static status_t process_r(private_ike_natd_t *this, message_t *message)
|
||||
{
|
||||
{
|
||||
process_payloads(this, message);
|
||||
|
||||
return NEED_MORE;
|
||||
|
||||
@@ -70,7 +70,7 @@ static status_t process_i(private_ike_reauth_t *this, message_t *message)
|
||||
iterator = this->ike_sa->create_child_sa_iterator(this->ike_sa);
|
||||
if (iterator->get_count(iterator) == 0
|
||||
#ifdef ME
|
||||
/* we allow a peer to reauth a mediation connection (without CHILD_SA) */
|
||||
/* we allow peers to reauth mediation connections (without children) */
|
||||
&& !peer_cfg->is_mediation(peer_cfg)
|
||||
#endif /* ME */
|
||||
)
|
||||
|
||||
@@ -79,7 +79,7 @@ extern enum_name_t *task_type_names;
|
||||
*
|
||||
* A task is an elemantary operation. It may be handled by a single or by
|
||||
* multiple exchanges. An exchange may even complete multiple tasks.
|
||||
* A task has a build() and an process() operation. The build() operation
|
||||
* A task has a build() and an process() operation. The build() operation
|
||||
* creates payloads and adds it to the message. The process() operation
|
||||
* inspects a message and handles its payloads. An initiator of an exchange
|
||||
* first calls build() to build the request, and processes the response message
|
||||
@@ -97,7 +97,7 @@ struct task_t {
|
||||
|
||||
/**
|
||||
* Build a request or response message for this task.
|
||||
*
|
||||
*
|
||||
* @param message message to add payloads to
|
||||
* @return
|
||||
* - FAILED if a critical error occured
|
||||
@@ -109,7 +109,7 @@ struct task_t {
|
||||
|
||||
/**
|
||||
* Process a request or response message for this task.
|
||||
*
|
||||
*
|
||||
* @param message message to read payloads from
|
||||
* @return
|
||||
* - FAILED if a critical error occured
|
||||
|
||||
Reference in New Issue
Block a user