ike: Consistently log CHILD_SAs with their unique_id instead of their reqid
This commit is contained in:
@@ -285,7 +285,7 @@ static bool setup_tun_device(private_android_service_t *this,
|
|||||||
int tunfd;
|
int tunfd;
|
||||||
|
|
||||||
DBG1(DBG_DMN, "setting up TUN device for CHILD_SA %s{%u}",
|
DBG1(DBG_DMN, "setting up TUN device for CHILD_SA %s{%u}",
|
||||||
child_sa->get_name(child_sa), child_sa->get_reqid(child_sa));
|
child_sa->get_name(child_sa), child_sa->get_unique_id(child_sa));
|
||||||
|
|
||||||
builder = charonservice->get_vpnservice_builder(charonservice);
|
builder = charonservice->get_vpnservice_builder(charonservice);
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ METHOD(listener_t, child_keys, bool,
|
|||||||
ike_sa->get_other_host(ike_sa), child_sa->get_spi(child_sa, FALSE));
|
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{%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_reqid(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) ? "*" : "");
|
||||||
|
|
||||||
|
|||||||
@@ -836,7 +836,7 @@ static void process_child_add(private_ha_dispatcher_t *this,
|
|||||||
|
|
||||||
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_reqid(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) ? "*" : "");
|
||||||
child_sa->add_policies(child_sa, local_ts, remote_ts);
|
child_sa->add_policies(child_sa, local_ts, remote_ts);
|
||||||
|
|||||||
@@ -1596,7 +1596,8 @@ static bool is_redundant(private_task_manager_t *this, child_sa_t *child_sa)
|
|||||||
child_sa->get_lifetime(child_sa, FALSE))
|
child_sa->get_lifetime(child_sa, FALSE))
|
||||||
{
|
{
|
||||||
DBG1(DBG_IKE, "deleting redundant CHILD_SA %s{%d}",
|
DBG1(DBG_IKE, "deleting redundant CHILD_SA %s{%d}",
|
||||||
child_sa->get_name(child_sa), child_sa->get_reqid(child_sa));
|
child_sa->get_name(child_sa),
|
||||||
|
child_sa->get_unique_id(child_sa));
|
||||||
redundant = TRUE;
|
redundant = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ static bool delete_child(private_quick_delete_t *this, protocol_id_t protocol,
|
|||||||
{
|
{
|
||||||
DBG0(DBG_IKE, "closing expired CHILD_SA %s{%d} "
|
DBG0(DBG_IKE, "closing expired CHILD_SA %s{%d} "
|
||||||
"with SPIs %.8x_i %.8x_o and TS %#R=== %#R",
|
"with SPIs %.8x_i %.8x_o and TS %#R=== %#R",
|
||||||
child_sa->get_name(child_sa), child_sa->get_reqid(child_sa),
|
child_sa->get_name(child_sa), child_sa->get_unique_id(child_sa),
|
||||||
ntohl(child_sa->get_spi(child_sa, TRUE)),
|
ntohl(child_sa->get_spi(child_sa, TRUE)),
|
||||||
ntohl(child_sa->get_spi(child_sa, FALSE)), my_ts, other_ts);
|
ntohl(child_sa->get_spi(child_sa, FALSE)), my_ts, other_ts);
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@ static bool delete_child(private_quick_delete_t *this, protocol_id_t protocol,
|
|||||||
|
|
||||||
DBG0(DBG_IKE, "closing CHILD_SA %s{%d} with SPIs "
|
DBG0(DBG_IKE, "closing CHILD_SA %s{%d} with SPIs "
|
||||||
"%.8x_i (%llu bytes) %.8x_o (%llu bytes) and TS %#R=== %#R",
|
"%.8x_i (%llu bytes) %.8x_o (%llu bytes) and TS %#R=== %#R",
|
||||||
child_sa->get_name(child_sa), child_sa->get_reqid(child_sa),
|
child_sa->get_name(child_sa), child_sa->get_unique_id(child_sa),
|
||||||
ntohl(child_sa->get_spi(child_sa, TRUE)), bytes_in,
|
ntohl(child_sa->get_spi(child_sa, TRUE)), bytes_in,
|
||||||
ntohl(child_sa->get_spi(child_sa, FALSE)), bytes_out,
|
ntohl(child_sa->get_spi(child_sa, FALSE)), bytes_out,
|
||||||
my_ts, other_ts);
|
my_ts, other_ts);
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ static bool install(private_quick_mode_t *this)
|
|||||||
DBG0(DBG_IKE, "CHILD_SA %s{%d} established "
|
DBG0(DBG_IKE, "CHILD_SA %s{%d} established "
|
||||||
"with SPIs %.8x_i %.8x_o and TS %#R=== %#R",
|
"with SPIs %.8x_i %.8x_o and TS %#R=== %#R",
|
||||||
this->child_sa->get_name(this->child_sa),
|
this->child_sa->get_name(this->child_sa),
|
||||||
this->child_sa->get_reqid(this->child_sa),
|
this->child_sa->get_unique_id(this->child_sa),
|
||||||
ntohl(this->child_sa->get_spi(this->child_sa, TRUE)),
|
ntohl(this->child_sa->get_spi(this->child_sa, TRUE)),
|
||||||
ntohl(this->child_sa->get_spi(this->child_sa, FALSE)), my_ts, other_ts);
|
ntohl(this->child_sa->get_spi(this->child_sa, FALSE)), my_ts, other_ts);
|
||||||
|
|
||||||
@@ -986,7 +986,8 @@ static void check_for_rekeyed_child(private_quick_mode_t *this)
|
|||||||
FALSE).value;
|
FALSE).value;
|
||||||
child_sa->set_state(child_sa, CHILD_REKEYING);
|
child_sa->set_state(child_sa, CHILD_REKEYING);
|
||||||
DBG1(DBG_IKE, "detected rekeying of CHILD_SA %s{%u}",
|
DBG1(DBG_IKE, "detected rekeying of CHILD_SA %s{%u}",
|
||||||
child_sa->get_name(child_sa), this->reqid);
|
child_sa->get_name(child_sa),
|
||||||
|
child_sa->get_unique_id(child_sa));
|
||||||
}
|
}
|
||||||
policies->destroy(policies);
|
policies->destroy(policies);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -703,7 +703,7 @@ static status_t select_and_install(private_child_create_t *this,
|
|||||||
DBG0(DBG_IKE, "CHILD_SA %s{%d} established "
|
DBG0(DBG_IKE, "CHILD_SA %s{%d} established "
|
||||||
"with SPIs %.8x_i %.8x_o and TS %#R=== %#R",
|
"with SPIs %.8x_i %.8x_o and TS %#R=== %#R",
|
||||||
this->child_sa->get_name(this->child_sa),
|
this->child_sa->get_name(this->child_sa),
|
||||||
this->child_sa->get_reqid(this->child_sa),
|
this->child_sa->get_unique_id(this->child_sa),
|
||||||
ntohl(this->child_sa->get_spi(this->child_sa, TRUE)),
|
ntohl(this->child_sa->get_spi(this->child_sa, TRUE)),
|
||||||
ntohl(this->child_sa->get_spi(this->child_sa, FALSE)), my_ts, other_ts);
|
ntohl(this->child_sa->get_spi(this->child_sa, FALSE)), my_ts, other_ts);
|
||||||
|
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ static void log_children(private_child_delete_t *this)
|
|||||||
{
|
{
|
||||||
DBG0(DBG_IKE, "closing expired CHILD_SA %s{%d} "
|
DBG0(DBG_IKE, "closing expired CHILD_SA %s{%d} "
|
||||||
"with SPIs %.8x_i %.8x_o and TS %#R=== %#R",
|
"with SPIs %.8x_i %.8x_o and TS %#R=== %#R",
|
||||||
child_sa->get_name(child_sa), child_sa->get_reqid(child_sa),
|
child_sa->get_name(child_sa), child_sa->get_unique_id(child_sa),
|
||||||
ntohl(child_sa->get_spi(child_sa, TRUE)),
|
ntohl(child_sa->get_spi(child_sa, TRUE)),
|
||||||
ntohl(child_sa->get_spi(child_sa, FALSE)), my_ts, other_ts);
|
ntohl(child_sa->get_spi(child_sa, FALSE)), my_ts, other_ts);
|
||||||
}
|
}
|
||||||
@@ -278,7 +278,7 @@ static void log_children(private_child_delete_t *this)
|
|||||||
|
|
||||||
DBG0(DBG_IKE, "closing CHILD_SA %s{%d} with SPIs %.8x_i "
|
DBG0(DBG_IKE, "closing CHILD_SA %s{%d} with SPIs %.8x_i "
|
||||||
"(%llu bytes) %.8x_o (%llu bytes) and TS %#R=== %#R",
|
"(%llu bytes) %.8x_o (%llu bytes) and TS %#R=== %#R",
|
||||||
child_sa->get_name(child_sa), child_sa->get_reqid(child_sa),
|
child_sa->get_name(child_sa), child_sa->get_unique_id(child_sa),
|
||||||
ntohl(child_sa->get_spi(child_sa, TRUE)), bytes_in,
|
ntohl(child_sa->get_spi(child_sa, TRUE)), bytes_in,
|
||||||
ntohl(child_sa->get_spi(child_sa, FALSE)), bytes_out,
|
ntohl(child_sa->get_spi(child_sa, FALSE)), bytes_out,
|
||||||
my_ts, other_ts);
|
my_ts, other_ts);
|
||||||
|
|||||||
Reference in New Issue
Block a user