ipsec status lists IPCOMP CPIs

This commit is contained in:
Andreas Steffen
2008-07-22 12:03:58 +00:00
parent c3967e779e
commit 66da78b4bb
5 changed files with 43 additions and 7 deletions
+11 -1
View File
@@ -127,11 +127,21 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
if (child_sa->get_state(child_sa) == CHILD_INSTALLED)
{
u_int16_t my_cpi = child_sa->get_cpi(child_sa, TRUE);
u_int16_t other_cpi = child_sa->get_cpi(child_sa, FALSE);
fprintf(out, ", %N SPIs: %.8x_i %.8x_o",
protocol_id_names, child_sa->get_protocol(child_sa),
ntohl(child_sa->get_spi(child_sa, TRUE)),
ntohl(child_sa->get_spi(child_sa, FALSE)));
/* Is IPcomp installed ? */
if (my_cpi && other_cpi)
{
fprintf(out, ", IPCOMP CPIs: %.4x_i %.4x_o",
ntohs(my_cpi), ntohs(other_cpi));
}
if (all)
{
fprintf(out, "\n%12s{%d}: ", child_sa->get_name(child_sa),