stroke: List proposals in statusall without leading '/' in AH SAs
This commit is contained in:
@@ -245,6 +245,7 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
|
|||||||
u_int16_t encr_alg = ENCR_UNDEFINED, int_alg = AUTH_UNDEFINED;
|
u_int16_t encr_alg = ENCR_UNDEFINED, int_alg = AUTH_UNDEFINED;
|
||||||
u_int16_t encr_size = 0, int_size = 0;
|
u_int16_t encr_size = 0, int_size = 0;
|
||||||
u_int16_t esn = NO_EXT_SEQ_NUMBERS;
|
u_int16_t esn = NO_EXT_SEQ_NUMBERS;
|
||||||
|
bool first = TRUE;
|
||||||
|
|
||||||
proposal->get_algorithm(proposal, ENCRYPTION_ALGORITHM,
|
proposal->get_algorithm(proposal, ENCRYPTION_ALGORITHM,
|
||||||
&encr_alg, &encr_size);
|
&encr_alg, &encr_size);
|
||||||
@@ -256,6 +257,7 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
|
|||||||
if (encr_alg != ENCR_UNDEFINED)
|
if (encr_alg != ENCR_UNDEFINED)
|
||||||
{
|
{
|
||||||
fprintf(out, "%N", encryption_algorithm_names, encr_alg);
|
fprintf(out, "%N", encryption_algorithm_names, encr_alg);
|
||||||
|
first = FALSE;
|
||||||
if (encr_size)
|
if (encr_size)
|
||||||
{
|
{
|
||||||
fprintf(out, "_%u", encr_size);
|
fprintf(out, "_%u", encr_size);
|
||||||
@@ -263,7 +265,11 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
|
|||||||
}
|
}
|
||||||
if (int_alg != AUTH_UNDEFINED)
|
if (int_alg != AUTH_UNDEFINED)
|
||||||
{
|
{
|
||||||
fprintf(out, "/%N", integrity_algorithm_names, int_alg);
|
if (!first)
|
||||||
|
{
|
||||||
|
fprintf(out, "/");
|
||||||
|
}
|
||||||
|
fprintf(out, "%N", integrity_algorithm_names, int_alg);
|
||||||
if (int_size)
|
if (int_size)
|
||||||
{
|
{
|
||||||
fprintf(out, "_%u", int_size);
|
fprintf(out, "_%u", int_size);
|
||||||
|
|||||||
Reference in New Issue
Block a user