ike: Use correct format string for unique Child SA identifiers
Analogous to the previous commit.
This commit is contained in:
@@ -141,7 +141,7 @@ METHOD(listener_t, child_keys, bool,
|
||||
ike_sa->get_my_host(ike_sa), child_sa->get_spi(child_sa, TRUE));
|
||||
seg_o = this->kernel->get_segment_spi(this->kernel,
|
||||
ike_sa->get_other_host(ike_sa), child_sa->get_spi(child_sa, FALSE));
|
||||
DBG1(DBG_CFG, "handling HA CHILD_SA %s{%d} %#R === %#R "
|
||||
DBG1(DBG_CFG, "handling HA CHILD_SA %s{%u} %#R === %#R "
|
||||
"(segment in: %d%s, out: %d%s)", child_sa->get_name(child_sa),
|
||||
child_sa->get_unique_id(child_sa), local_ts, remote_ts,
|
||||
seg_i, this->segments->is_active(this->segments, seg_i) ? "*" : "",
|
||||
|
||||
@@ -946,7 +946,7 @@ static void process_child_add(private_ha_dispatcher_t *this,
|
||||
ike_sa->get_my_host(ike_sa), inbound_spi);
|
||||
seg_o = this->kernel->get_segment_spi(this->kernel,
|
||||
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{%u} %#R === %#R "
|
||||
"(segment in: %d%s, out: %d%s)", child_sa->get_name(child_sa),
|
||||
child_sa->get_unique_id(child_sa), local_ts, remote_ts,
|
||||
seg_i, this->segments->is_active(this->segments, seg_i) ? "*" : "",
|
||||
|
||||
@@ -96,7 +96,7 @@ static bool install_generic_trap(ike_sa_t *ike_sa, child_sa_t *child_sa)
|
||||
|
||||
#if DEBUG_LEVEL >= 1
|
||||
sec_label_t *label = child_sa->get_label(child_sa);
|
||||
DBG1(DBG_IKE, "installing trap %s{%d} with generic security label '%s'",
|
||||
DBG1(DBG_IKE, "installing trap %s{%u} with generic security label '%s'",
|
||||
child_sa->get_name(child_sa), child_sa->get_unique_id(child_sa),
|
||||
label->get_string(label));
|
||||
#endif
|
||||
@@ -173,7 +173,7 @@ METHOD(listener_t, ike_updown, bool,
|
||||
{
|
||||
#if DEBUG_LEVEL >= 1
|
||||
sec_label_t *label = child_sa->get_label(child_sa);
|
||||
DBG1(DBG_IKE, "uninstalling trap %s{%d} with generic security "
|
||||
DBG1(DBG_IKE, "uninstalling trap %s{%u} with generic security "
|
||||
"label '%s'", child_sa->get_name(child_sa),
|
||||
child_sa->get_unique_id(child_sa),
|
||||
label->get_string(label));
|
||||
|
||||
@@ -213,7 +213,7 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
|
||||
config = child_sa->get_config(child_sa);
|
||||
now = time_monotonic(NULL);
|
||||
|
||||
fprintf(out, "%12s{%d}: %N, %N%s, reqid %u",
|
||||
fprintf(out, "%12s{%u}: %N, %N%s, reqid %u",
|
||||
child_sa->get_name(child_sa), child_sa->get_unique_id(child_sa),
|
||||
child_sa_state_names, child_sa->get_state(child_sa),
|
||||
ipsec_mode_names, child_sa->get_mode(child_sa),
|
||||
@@ -237,7 +237,7 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
|
||||
|
||||
if (all)
|
||||
{
|
||||
fprintf(out, "\n%12s{%d}: ", child_sa->get_name(child_sa),
|
||||
fprintf(out, "\n%12s{%u}: ", child_sa->get_name(child_sa),
|
||||
child_sa->get_unique_id(child_sa));
|
||||
|
||||
proposal = child_sa->get_proposal(child_sa);
|
||||
@@ -329,7 +329,7 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
|
||||
child_sa->create_ts_enumerator(child_sa, TRUE));
|
||||
other_ts = linked_list_create_from_enumerator(
|
||||
child_sa->create_ts_enumerator(child_sa, FALSE));
|
||||
fprintf(out, "\n%12s{%d}: %#R === %#R\n",
|
||||
fprintf(out, "\n%12s{%u}: %#R === %#R\n",
|
||||
child_sa->get_name(child_sa), child_sa->get_unique_id(child_sa),
|
||||
my_ts, other_ts);
|
||||
my_ts->destroy(my_ts);
|
||||
|
||||
@@ -78,7 +78,7 @@ METHOD(job_t, execute, job_requeue_t,
|
||||
charon->child_sa_manager, this->id, &child_sa);
|
||||
if (!ike_sa)
|
||||
{
|
||||
DBG1(DBG_JOB, "CHILD_SA {%d} not found for delete", this->id);
|
||||
DBG1(DBG_JOB, "CHILD_SA {%u} not found for delete", this->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -99,7 +99,7 @@ METHOD(job_t, execute, job_requeue_t,
|
||||
continue;
|
||||
}
|
||||
|
||||
DBG2(DBG_JOB, "found CHILD_SA with reqid {%d}", this->reqid);
|
||||
DBG2(DBG_JOB, "found CHILD_SA with reqid {%u}", this->reqid);
|
||||
|
||||
ike_sa->set_kmaddress(ike_sa, this->local, this->remote);
|
||||
|
||||
|
||||
@@ -410,7 +410,7 @@ METHOD(child_sa_t, set_state, void,
|
||||
{
|
||||
if (this->state != state)
|
||||
{
|
||||
DBG2(DBG_CHD, "CHILD_SA %s{%d} state change: %N => %N",
|
||||
DBG2(DBG_CHD, "CHILD_SA %s{%u} state change: %N => %N",
|
||||
get_name(this), this->unique_id,
|
||||
child_sa_state_names, this->state,
|
||||
child_sa_state_names, state);
|
||||
@@ -1973,7 +1973,7 @@ METHOD(child_sa_t, update, status_t,
|
||||
DBG1(DBG_CHD, "releasing reqid %u failed", this->reqid);
|
||||
}
|
||||
DBG1(DBG_CHD, "replaced reqid %u with reqid %u for updated "
|
||||
"CHILD_SA %s{%d}", this->reqid, new_reqid, get_name(this),
|
||||
"CHILD_SA %s{%u}", this->reqid, new_reqid, get_name(this),
|
||||
this->unique_id);
|
||||
this->reqid = new_reqid;
|
||||
}
|
||||
|
||||
@@ -1761,7 +1761,7 @@ bool ikev1_child_sa_is_redundant(ike_sa_t *ike_sa, child_sa_t *child_sa,
|
||||
have_equal_ts(current, child_sa, FALSE) &&
|
||||
(!cmp || cmp(child_sa, current)))
|
||||
{
|
||||
DBG1(DBG_IKE, "detected redundant CHILD_SA %s{%d}",
|
||||
DBG1(DBG_IKE, "detected redundant CHILD_SA %s{%u}",
|
||||
child_sa->get_name(child_sa),
|
||||
child_sa->get_unique_id(child_sa));
|
||||
redundant = TRUE;
|
||||
|
||||
@@ -122,7 +122,7 @@ static status_t delete_child(private_quick_delete_t *this,
|
||||
child_sa->create_ts_enumerator(child_sa, FALSE));
|
||||
if (this->expired)
|
||||
{
|
||||
DBG0(DBG_IKE, "closing expired CHILD_SA %s{%d} "
|
||||
DBG0(DBG_IKE, "closing expired CHILD_SA %s{%u} "
|
||||
"with SPIs %.8x_i %.8x_o and TS %#R === %#R",
|
||||
child_sa->get_name(child_sa), child_sa->get_unique_id(child_sa),
|
||||
ntohl(child_sa->get_spi(child_sa, TRUE)),
|
||||
@@ -133,7 +133,7 @@ static status_t delete_child(private_quick_delete_t *this,
|
||||
child_sa->get_usestats(child_sa, TRUE, NULL, &bytes_in, NULL);
|
||||
child_sa->get_usestats(child_sa, FALSE, NULL, &bytes_out, NULL);
|
||||
|
||||
DBG0(DBG_IKE, "closing CHILD_SA %s{%d} with SPIs "
|
||||
DBG0(DBG_IKE, "closing CHILD_SA %s{%u} with SPIs "
|
||||
"%.8x_i (%llu bytes) %.8x_o (%llu bytes) and TS %#R === %#R",
|
||||
child_sa->get_name(child_sa), child_sa->get_unique_id(child_sa),
|
||||
ntohl(child_sa->get_spi(child_sa, TRUE)), bytes_in,
|
||||
|
||||
@@ -396,7 +396,7 @@ static bool install(private_quick_mode_t *this)
|
||||
other_ts = linked_list_create_from_enumerator(
|
||||
this->child_sa->create_ts_enumerator(this->child_sa, FALSE));
|
||||
|
||||
DBG0(DBG_IKE, "CHILD_SA %s{%d} established "
|
||||
DBG0(DBG_IKE, "CHILD_SA %s{%u} established "
|
||||
"with SPIs %.8x_i %.8x_o and TS %#R === %#R",
|
||||
this->child_sa->get_name(this->child_sa),
|
||||
this->child_sa->get_unique_id(this->child_sa),
|
||||
|
||||
@@ -864,7 +864,7 @@ static status_t install_child_sa(private_child_create_t *this)
|
||||
other_ts = linked_list_create_from_enumerator(
|
||||
this->child_sa->create_ts_enumerator(this->child_sa, FALSE));
|
||||
|
||||
DBG0(DBG_IKE, "%sCHILD_SA %s{%d} established "
|
||||
DBG0(DBG_IKE, "%sCHILD_SA %s{%u} established "
|
||||
"with SPIs %.8x_i %.8x_o and TS %#R === %#R",
|
||||
(out_state == CHILD_OUTBOUND_INSTALLED) ? "" : "inbound ",
|
||||
this->child_sa->get_name(this->child_sa),
|
||||
@@ -1587,8 +1587,8 @@ static bool check_for_duplicate(private_child_create_t *this)
|
||||
other_ts = linked_list_create_from_enumerator(
|
||||
found->create_ts_enumerator(found, FALSE));
|
||||
|
||||
DBG1(DBG_IKE, "not establishing CHILD_SA %s{%d} due to existing "
|
||||
"duplicate {%d} with SPIs %.8x_i %.8x_o and TS %#R === %#R",
|
||||
DBG1(DBG_IKE, "not establishing CHILD_SA %s{%u} due to existing "
|
||||
"duplicate {%u} with SPIs %.8x_i %.8x_o and TS %#R === %#R",
|
||||
this->child_sa->get_name(this->child_sa),
|
||||
this->child_sa->get_unique_id(this->child_sa),
|
||||
found->get_unique_id(found),
|
||||
@@ -1611,7 +1611,7 @@ static bool check_for_generic_label(private_child_create_t *this)
|
||||
{
|
||||
#if DEBUG_LEVEL >= 1
|
||||
sec_label_t *label = this->config->get_label(this->config);
|
||||
DBG1(DBG_IKE, "not establishing CHILD_SA %s{%d} with generic "
|
||||
DBG1(DBG_IKE, "not establishing CHILD_SA %s{%u} with generic "
|
||||
"label '%s'", this->child_sa->get_name(this->child_sa),
|
||||
this->child_sa->get_unique_id(this->child_sa),
|
||||
label->get_string(label));
|
||||
@@ -1790,13 +1790,13 @@ METHOD(task_t, build_i, status_t,
|
||||
|
||||
if (this->child.reqid)
|
||||
{
|
||||
DBG0(DBG_IKE, "establishing CHILD_SA %s{%d} reqid %d",
|
||||
DBG0(DBG_IKE, "establishing CHILD_SA %s{%u} reqid %d",
|
||||
this->child_sa->get_name(this->child_sa),
|
||||
this->child_sa->get_unique_id(this->child_sa), this->child.reqid);
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG0(DBG_IKE, "establishing CHILD_SA %s{%d}",
|
||||
DBG0(DBG_IKE, "establishing CHILD_SA %s{%u}",
|
||||
this->child_sa->get_name(this->child_sa),
|
||||
this->child_sa->get_unique_id(this->child_sa));
|
||||
}
|
||||
@@ -2723,7 +2723,7 @@ METHOD(task_t, process_i, status_t,
|
||||
|
||||
if (this->aborted)
|
||||
{
|
||||
DBG1(DBG_IKE, "deleting CHILD_SA %s{%d} with SPIs %.8x_i %.8x_o of "
|
||||
DBG1(DBG_IKE, "deleting CHILD_SA %s{%u} with SPIs %.8x_i %.8x_o of "
|
||||
"aborted %N task",
|
||||
this->child_sa->get_name(this->child_sa),
|
||||
this->child_sa->get_unique_id(this->child_sa),
|
||||
|
||||
@@ -1053,7 +1053,7 @@ bool child_rekey_conclude_rekeying(child_sa_t *old, child_sa_t *new)
|
||||
other_ts = linked_list_create_from_enumerator(
|
||||
new->create_ts_enumerator(new, FALSE));
|
||||
|
||||
DBG0(DBG_IKE, "outbound CHILD_SA %s{%d} established "
|
||||
DBG0(DBG_IKE, "outbound CHILD_SA %s{%u} established "
|
||||
"with SPIs %.8x_i %.8x_o and TS %#R === %#R",
|
||||
new->get_name(new), new->get_unique_id(new),
|
||||
ntohl(new->get_spi(new, TRUE)), ntohl(new->get_spi(new, FALSE)),
|
||||
|
||||
Reference in New Issue
Block a user