added some debug for DELETE_SA process

This commit is contained in:
vanhu 2007-05-04 09:09:35 +00:00
parent ae24f5b259
commit ff0f36d165
1 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: isakmp_inf.c,v 1.20 2007/03/26 15:58:07 vanhu Exp $ */
/* $NetBSD: isakmp_inf.c,v 1.21 2007/05/04 09:09:35 vanhu Exp $ */
/* Id: isakmp_inf.c,v 1.44 2006/05/06 20:45:52 manubsd Exp */
@ -645,8 +645,11 @@ isakmp_info_send_d2(iph2)
* It's nonsensical to negotiate phase 1 to send the information.
*/
iph1 = getph1byaddr(iph2->src, iph2->dst);
if (iph1 == NULL)
if (iph1 == NULL){
plog(LLV_DEBUG2, LOCATION, NULL,
"No ph1 handler found, could not send DELETE_SA\n");
return 0;
}
/* create delete payload */
for (pr = iph2->approval->head; pr != NULL; pr = pr->next) {
@ -1161,6 +1164,11 @@ purge_ipsec_spi(dst0, proto, spi, n)
size_t i;
caddr_t mhp[SADB_EXT_MAX + 1];
plog(LLV_DEBUG2, LOCATION, NULL,
"purge_ipsec_spi:\n");
plog(LLV_DEBUG2, LOCATION, NULL, "dst0: %s\n", saddr2str(dst0));
plog(LLV_DEBUG2, LOCATION, NULL, "SPI: %08X\n", ntohl(spi[0]));
buf = pfkey_dump_sadb(ipsecdoi2pfkey_proto(proto));
if (buf == NULL) {
plog(LLV_DEBUG, LOCATION, NULL,
@ -1207,6 +1215,10 @@ purge_ipsec_spi(dst0, proto, spi, n)
msg = next;
continue;
}
plog(LLV_DEBUG2, LOCATION, NULL, "src: %s\n", saddr2str(src));
plog(LLV_DEBUG2, LOCATION, NULL, "dst: %s\n", saddr2str(dst));
/* XXX n^2 algorithm, inefficient */