ike: Use correct format string for unique IKE SA identifiers
Would take a while until it became an issue, though.
This commit is contained in:
@@ -211,7 +211,7 @@ static void enable_disable(private_ha_segments_t *this, u_int segment,
|
||||
unique_id);
|
||||
if (ike_sa)
|
||||
{
|
||||
DBG1(DBG_IKE, "destroying incomplete IKE_SA %s[%d] after "
|
||||
DBG1(DBG_IKE, "destroying incomplete IKE_SA %s[%u] after "
|
||||
"%sactivating HA segment %d", ike_sa->get_name(ike_sa),
|
||||
unique_id, enable ? "" : "de", segment);
|
||||
charon->ike_sa_manager->checkin_and_destroy(charon->ike_sa_manager,
|
||||
|
||||
@@ -79,7 +79,7 @@ static void log_task_q(FILE *out, ike_sa_t *ike_sa, task_queue_t q, char *name)
|
||||
{
|
||||
if (!has)
|
||||
{
|
||||
fprintf(out, "%12s[%d]: Tasks %s: ", ike_sa->get_name(ike_sa),
|
||||
fprintf(out, "%12s[%u]: Tasks %s: ", ike_sa->get_name(ike_sa),
|
||||
ike_sa->get_unique_id(ike_sa), name);
|
||||
has = TRUE;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ static void log_ike_sa(FILE *out, ike_sa_t *ike_sa, bool all)
|
||||
ike_sa_id_t *id = ike_sa->get_id(ike_sa);
|
||||
time_t now = time_monotonic(NULL);
|
||||
|
||||
fprintf(out, "%12s[%d]: %N",
|
||||
fprintf(out, "%12s[%u]: %N",
|
||||
ike_sa->get_name(ike_sa), ike_sa->get_unique_id(ike_sa),
|
||||
ike_sa_state_names, ike_sa->get_state(ike_sa));
|
||||
|
||||
@@ -125,7 +125,7 @@ static void log_ike_sa(FILE *out, ike_sa_t *ike_sa, bool all)
|
||||
|
||||
if (!eap_id->equals(eap_id, ike_sa->get_other_id(ike_sa)))
|
||||
{
|
||||
fprintf(out, "%12s[%d]: Remote %s identity: %Y\n",
|
||||
fprintf(out, "%12s[%u]: Remote %s identity: %Y\n",
|
||||
ike_sa->get_name(ike_sa), ike_sa->get_unique_id(ike_sa),
|
||||
ike_sa->get_version(ike_sa) == IKEV1 ? "XAuth" : "EAP",
|
||||
eap_id);
|
||||
@@ -133,7 +133,7 @@ static void log_ike_sa(FILE *out, ike_sa_t *ike_sa, bool all)
|
||||
|
||||
ike_proposal = ike_sa->get_proposal(ike_sa);
|
||||
|
||||
fprintf(out, "%12s[%d]: %N SPIs: %.16"PRIx64"_i%s %.16"PRIx64"_r%s",
|
||||
fprintf(out, "%12s[%u]: %N SPIs: %.16"PRIx64"_i%s %.16"PRIx64"_r%s",
|
||||
ike_sa->get_name(ike_sa), ike_sa->get_unique_id(ike_sa),
|
||||
ike_version_names, ike_sa->get_version(ike_sa),
|
||||
be64toh(id->get_initiator_spi(id)),
|
||||
@@ -188,7 +188,7 @@ static void log_ike_sa(FILE *out, ike_sa_t *ike_sa, bool all)
|
||||
char buf[BUF_LEN];
|
||||
|
||||
snprintf(buf, BUF_LEN, "%P", ike_proposal);
|
||||
fprintf(out, "%12s[%d]: IKE proposal: %s\n",
|
||||
fprintf(out, "%12s[%u]: IKE proposal: %s\n",
|
||||
ike_sa->get_name(ike_sa), ike_sa->get_unique_id(ike_sa),
|
||||
buf+4);
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ static job_requeue_t check_systime(private_systime_fix_plugin_t *this)
|
||||
job = &delete_ike_sa_job_create(ike_sa->get_id(ike_sa),
|
||||
TRUE)->job_interface;
|
||||
}
|
||||
DBG1(DBG_CFG, "%s[%d] has certificates not valid, %s IKE_SA",
|
||||
DBG1(DBG_CFG, "%s[%u] has certificates not valid, %s IKE_SA",
|
||||
ike_sa->get_name(ike_sa), ike_sa->get_unique_id(ike_sa),
|
||||
action);
|
||||
lib->processor->queue_job(lib->processor, job);
|
||||
|
||||
Reference in New Issue
Block a user