Show SPI in proposal logging hook

This commit is contained in:
Martin Willi
2011-01-05 16:45:48 +01:00
parent 42133e33bd
commit f2116c6de7
+8 -2
View File
@@ -54,8 +54,14 @@ METHOD(listener_t, message, bool,
proposals = list->create_enumerator(list);
while (proposals->enumerate(proposals, &proposal))
{
DBG1(DBG_CFG, " %d: %P",
proposal->get_number(proposal), proposal);
u_int64_t spi = proposal->get_spi(proposal);
if (proposal->get_protocol(proposal) != PROTO_IKE)
{
spi = htonl(spi);
}
DBG1(DBG_CFG, " %d (SPI 0x%llx): %P",
proposal->get_number(proposal), spi, proposal);
}
proposals->destroy(proposals);
list->destroy_offset(list, offsetof(proposal_t, destroy));