ha: Fix build with DEBUG_LEVEL < 1
This commit is contained in:
@@ -60,7 +60,6 @@ METHOD(listener_t, child_keys, bool,
|
|||||||
linked_list_t *local_ts, *remote_ts;
|
linked_list_t *local_ts, *remote_ts;
|
||||||
enumerator_t *enumerator;
|
enumerator_t *enumerator;
|
||||||
traffic_selector_t *ts;
|
traffic_selector_t *ts;
|
||||||
u_int seg_i, seg_o;
|
|
||||||
|
|
||||||
if (this->tunnel && this->tunnel->is_sa(this->tunnel, ike_sa))
|
if (this->tunnel && this->tunnel->is_sa(this->tunnel, ike_sa))
|
||||||
{ /* do not sync SA between nodes */
|
{ /* do not sync SA between nodes */
|
||||||
@@ -127,6 +126,9 @@ METHOD(listener_t, child_keys, bool,
|
|||||||
}
|
}
|
||||||
enumerator->destroy(enumerator);
|
enumerator->destroy(enumerator);
|
||||||
|
|
||||||
|
#if DEBUG_LEVEL >= 1
|
||||||
|
u_int seg_i, seg_o;
|
||||||
|
|
||||||
seg_i = this->kernel->get_segment_spi(this->kernel,
|
seg_i = this->kernel->get_segment_spi(this->kernel,
|
||||||
ike_sa->get_my_host(ike_sa), child_sa->get_spi(child_sa, TRUE));
|
ike_sa->get_my_host(ike_sa), child_sa->get_spi(child_sa, TRUE));
|
||||||
seg_o = this->kernel->get_segment_spi(this->kernel,
|
seg_o = this->kernel->get_segment_spi(this->kernel,
|
||||||
@@ -136,6 +138,7 @@ METHOD(listener_t, child_keys, bool,
|
|||||||
child_sa->get_unique_id(child_sa), local_ts, remote_ts,
|
child_sa->get_unique_id(child_sa), local_ts, remote_ts,
|
||||||
seg_i, this->segments->is_active(this->segments, seg_i) ? "*" : "",
|
seg_i, this->segments->is_active(this->segments, seg_i) ? "*" : "",
|
||||||
seg_o, this->segments->is_active(this->segments, seg_o) ? "*" : "");
|
seg_o, this->segments->is_active(this->segments, seg_o) ? "*" : "");
|
||||||
|
#endif /* DEBUG_LEVEL */
|
||||||
|
|
||||||
local_ts->destroy(local_ts);
|
local_ts->destroy(local_ts);
|
||||||
remote_ts->destroy(remote_ts);
|
remote_ts->destroy(remote_ts);
|
||||||
|
|||||||
@@ -658,7 +658,6 @@ static void process_child_add(private_ha_dispatcher_t *this,
|
|||||||
uint8_t mode = MODE_TUNNEL, ipcomp = 0;
|
uint8_t mode = MODE_TUNNEL, ipcomp = 0;
|
||||||
uint16_t encr = 0, integ = 0, len = 0, dh_grp = 0;
|
uint16_t encr = 0, integ = 0, len = 0, dh_grp = 0;
|
||||||
uint16_t esn = NO_EXT_SEQ_NUMBERS;
|
uint16_t esn = NO_EXT_SEQ_NUMBERS;
|
||||||
u_int seg_i, seg_o;
|
|
||||||
chunk_t nonce_i = chunk_empty, nonce_r = chunk_empty, secret = chunk_empty;
|
chunk_t nonce_i = chunk_empty, nonce_r = chunk_empty, secret = chunk_empty;
|
||||||
chunk_t encr_i, integ_i, encr_r, integ_r;
|
chunk_t encr_i, integ_i, encr_r, integ_r;
|
||||||
linked_list_t *local_ts, *remote_ts;
|
linked_list_t *local_ts, *remote_ts;
|
||||||
@@ -858,16 +857,20 @@ static void process_child_add(private_ha_dispatcher_t *this,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DEBUG_LEVEL >= 1
|
||||||
|
u_int seg_i, seg_o;
|
||||||
|
|
||||||
seg_i = this->kernel->get_segment_spi(this->kernel,
|
seg_i = this->kernel->get_segment_spi(this->kernel,
|
||||||
ike_sa->get_my_host(ike_sa), inbound_spi);
|
ike_sa->get_my_host(ike_sa), inbound_spi);
|
||||||
seg_o = this->kernel->get_segment_spi(this->kernel,
|
seg_o = this->kernel->get_segment_spi(this->kernel,
|
||||||
ike_sa->get_other_host(ike_sa), outbound_spi);
|
ike_sa->get_other_host(ike_sa), outbound_spi);
|
||||||
|
|
||||||
DBG1(DBG_CFG, "installed HA CHILD_SA %s{%d} %#R === %#R "
|
DBG1(DBG_CFG, "installed HA CHILD_SA %s{%d} %#R === %#R "
|
||||||
"(segment in: %d%s, out: %d%s)", child_sa->get_name(child_sa),
|
"(segment in: %d%s, out: %d%s)", child_sa->get_name(child_sa),
|
||||||
child_sa->get_unique_id(child_sa), local_ts, remote_ts,
|
child_sa->get_unique_id(child_sa), local_ts, remote_ts,
|
||||||
seg_i, this->segments->is_active(this->segments, seg_i) ? "*" : "",
|
seg_i, this->segments->is_active(this->segments, seg_i) ? "*" : "",
|
||||||
seg_o, this->segments->is_active(this->segments, seg_o) ? "*" : "");
|
seg_o, this->segments->is_active(this->segments, seg_o) ? "*" : "");
|
||||||
|
#endif /* DEBUG_LEVEL */
|
||||||
|
|
||||||
child_sa->install_policies(child_sa);
|
child_sa->install_policies(child_sa);
|
||||||
local_ts->destroy_offset(local_ts, offsetof(traffic_selector_t, destroy));
|
local_ts->destroy_offset(local_ts, offsetof(traffic_selector_t, destroy));
|
||||||
remote_ts->destroy_offset(remote_ts, offsetof(traffic_selector_t, destroy));
|
remote_ts->destroy_offset(remote_ts, offsetof(traffic_selector_t, destroy));
|
||||||
|
|||||||
Reference in New Issue
Block a user