From 9ef49d8b6f56c91c360dacd78c3cab2300da33fb Mon Sep 17 00:00:00 2001 From: bz Date: Thu, 27 Nov 2008 10:43:08 +0000 Subject: Unify ipsec[46]_delete_pcbpolicy in ipsec_delete_pcbpolicy. Ignoring different names because of macros (in6pcb, in6p_sp) and inp vs. in6p variable name both functions were entirely identical. Reviewed by: rwatson (as part of a larger changeset) MFC after: 6 weeks (*) (*) possibly need to leave a stub wrappers in 7 to keep the symbols. --- sys/netipsec/ipsec.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'sys/netipsec/ipsec.c') diff --git a/sys/netipsec/ipsec.c b/sys/netipsec/ipsec.c index c99ccca..2fd83f0 100644 --- a/sys/netipsec/ipsec.c +++ b/sys/netipsec/ipsec.c @@ -1216,7 +1216,7 @@ ipsec4_get_policy(inp, request, len, mp) /* delete policy in PCB */ int -ipsec4_delete_pcbpolicy(inp) +ipsec_delete_pcbpolicy(inp) struct inpcb *inp; { IPSEC_ASSERT(inp != NULL, ("null inp")); @@ -1308,27 +1308,6 @@ ipsec6_get_policy(in6p, request, len, mp) return ipsec_get_policy(pcb_sp, mp); } - -int -ipsec6_delete_pcbpolicy(in6p) - struct in6pcb *in6p; -{ - IPSEC_ASSERT(in6p != NULL, ("null in6p")); - - if (in6p->in6p_sp == NULL) - return 0; - - if (in6p->in6p_sp->sp_in != NULL) - KEY_FREESP(&in6p->in6p_sp->sp_in); - - if (in6p->in6p_sp->sp_out != NULL) - KEY_FREESP(&in6p->in6p_sp->sp_out); - - ipsec_delpcbpolicy(in6p->in6p_sp); - in6p->in6p_sp = NULL; - - return 0; -} #endif /* -- cgit v1.1