From 452cfb7edfdaa5e7e461a286a4a95991120ba446 Mon Sep 17 00:00:00 2001 From: vanhu Date: Wed, 21 Mar 2007 14:29:22 +0000 Subject: [PATCH] NULL sched check is now done in SCHED_KILL --- crypto/dist/ipsec-tools/src/racoon/handler.c | 5 ++--- crypto/dist/ipsec-tools/src/racoon/isakmp.c | 11 ++++------- crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c | 11 ++++------- crypto/dist/ipsec-tools/src/racoon/pfkey.c | 7 +++---- 4 files changed, 13 insertions(+), 21 deletions(-) diff --git a/crypto/dist/ipsec-tools/src/racoon/handler.c b/crypto/dist/ipsec-tools/src/racoon/handler.c index 8313d4ad81e0..a693e7fa11df 100644 --- a/crypto/dist/ipsec-tools/src/racoon/handler.c +++ b/crypto/dist/ipsec-tools/src/racoon/handler.c @@ -1,4 +1,4 @@ -/* $NetBSD: handler.c,v 1.10 2007/02/20 09:11:14 vanhu Exp $ */ +/* $NetBSD: handler.c,v 1.11 2007/03/21 14:29:22 vanhu Exp $ */ /* Id: handler.c,v 1.28 2006/05/26 12:17:29 manubsd Exp */ @@ -292,8 +292,7 @@ delph1(iph1) #endif #ifdef ENABLE_DPD - if (iph1->dpd_r_u != NULL) - SCHED_KILL(iph1->dpd_r_u); + SCHED_KILL(iph1->dpd_r_u); #endif if (iph1->remote) { diff --git a/crypto/dist/ipsec-tools/src/racoon/isakmp.c b/crypto/dist/ipsec-tools/src/racoon/isakmp.c index 812343bd528c..9cbb4737a7d2 100644 --- a/crypto/dist/ipsec-tools/src/racoon/isakmp.c +++ b/crypto/dist/ipsec-tools/src/racoon/isakmp.c @@ -1,4 +1,4 @@ -/* $NetBSD: isakmp.c,v 1.24 2007/03/15 10:37:44 vanhu Exp $ */ +/* $NetBSD: isakmp.c,v 1.25 2007/03/21 14:29:22 vanhu Exp $ */ /* Id: isakmp.c,v 1.74 2006/05/07 21:32:59 manubsd Exp */ @@ -845,8 +845,7 @@ ph1_main(iph1, msg) VPTRINIT(iph1->sendbuf); /* turn off schedule */ - if (iph1->scr) - SCHED_KILL(iph1->scr); + SCHED_KILL(iph1->scr); /* send */ plog(LLV_DEBUG, LOCATION, NULL, "===\n"); @@ -1007,8 +1006,7 @@ quick_main(iph2, msg) VPTRINIT(iph2->sendbuf); /* turn off schedule */ - if (iph2->scr) - SCHED_KILL(iph2->scr); + SCHED_KILL(iph2->scr); /* send */ plog(LLV_DEBUG, LOCATION, NULL, "===\n"); @@ -3399,8 +3397,7 @@ purge_remote(iph1) "purged ISAKMP-SA spi=%s.\n", isakmp_pindex(&(iph1->index), iph1->msgid)); - if (iph1->sce) - SCHED_KILL(iph1->sce); + SCHED_KILL(iph1->sce); iph1->sce = sched_new(1, isakmp_ph1delete_stub, iph1); } diff --git a/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c b/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c index 3175744255da..62b9827c1a6c 100644 --- a/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c +++ b/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c @@ -1,4 +1,4 @@ -/* $NetBSD: isakmp_inf.c,v 1.18 2007/02/20 16:32:28 vanhu Exp $ */ +/* $NetBSD: isakmp_inf.c,v 1.19 2007/03/21 14:29:22 vanhu Exp $ */ /* Id: isakmp_inf.c,v 1.44 2006/05/06 20:45:52 manubsd Exp */ @@ -521,8 +521,7 @@ isakmp_info_recv_d(iph1, delete, msgid, encrypted) EVT_PUSH(del_ph1->local, del_ph1->remote, EVTT_PEERPH1_NOPROP, NULL); - if (del_ph1->scr) - SCHED_KILL(del_ph1->scr); + SCHED_KILL(del_ph1->scr); /* * Do not delete IPsec SAs when receiving an IKE delete notification. @@ -1137,8 +1136,7 @@ purge_isakmp_spi(proto, spi, n) s_ipsecdoi_proto(proto), isakmp_pindex(&spi[i], 0)); - if (iph1->sce) - SCHED_KILL(iph1->sce); + SCHED_KILL(iph1->sce); iph1->status = PHASE1ST_EXPIRED; iph1->sce = sched_new(1, isakmp_ph1delete_stub, iph1); } @@ -1578,8 +1576,7 @@ isakmp_info_recv_r_u_ack (iph1, ru, msgid) /* Useless ??? */ iph1->dpd_lastack = time(NULL); - if (iph1->dpd_r_u != NULL) - SCHED_KILL(iph1->dpd_r_u); + SCHED_KILL(iph1->dpd_r_u); isakmp_sched_r_u(iph1, 0); diff --git a/crypto/dist/ipsec-tools/src/racoon/pfkey.c b/crypto/dist/ipsec-tools/src/racoon/pfkey.c index d3bb4e7b244d..c6d87b720d21 100644 --- a/crypto/dist/ipsec-tools/src/racoon/pfkey.c +++ b/crypto/dist/ipsec-tools/src/racoon/pfkey.c @@ -1,6 +1,6 @@ -/* $NetBSD: pfkey.c,v 1.19 2007/02/20 09:11:03 vanhu Exp $ */ +/* $NetBSD: pfkey.c,v 1.20 2007/03/21 14:29:22 vanhu Exp $ */ -/* $Id: pfkey.c,v 1.19 2007/02/20 09:11:03 vanhu Exp $ */ +/* $Id: pfkey.c,v 1.20 2007/03/21 14:29:22 vanhu Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -1281,8 +1281,7 @@ pk_recvupdate(mhp) iph2->ph1->ph2cnt++; /* turn off schedule */ - if (iph2->scr) - SCHED_KILL(iph2->scr); + SCHED_KILL(iph2->scr); /* * since we are going to reuse the phase2 handler, we need to