From owner-svn-src-all@FreeBSD.ORG Fri Mar 20 23:06:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 124351065675; Fri, 20 Mar 2009 23:06:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D2E78FC0C; Fri, 20 Mar 2009 23:06:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2KN6GxG016545; Fri, 20 Mar 2009 23:06:16 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2KN6GWE016539; Fri, 20 Mar 2009 23:06:16 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200903202306.n2KN6GWE016539@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 20 Mar 2009 23:06:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190190 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netinet netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2009 23:06:24 -0000 Author: bz Date: Fri Mar 20 23:06:16 2009 New Revision: 190190 URL: http://svn.freebsd.org/changeset/base/190190 Log: MFC r185366: 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. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netinet/in_pcb.c stable/7/sys/netinet/sctp_pcb.c stable/7/sys/netinet6/in6_pcb.c stable/7/sys/netipsec/ipsec.c stable/7/sys/netipsec/ipsec.h stable/7/sys/netipsec/ipsec6.h Modified: stable/7/sys/netinet/in_pcb.c ============================================================================== --- stable/7/sys/netinet/in_pcb.c Fri Mar 20 22:17:27 2009 (r190189) +++ stable/7/sys/netinet/in_pcb.c Fri Mar 20 23:06:16 2009 (r190190) @@ -901,7 +901,7 @@ in_pcbfree(struct inpcb *inp) INP_WLOCK_ASSERT(inp); #ifdef IPSEC - ipsec4_delete_pcbpolicy(inp); + ipsec_delete_pcbpolicy(inp); #endif /* IPSEC */ inp->inp_gencnt = ++ipi->ipi_gencnt; in_pcbremlists(inp); Modified: stable/7/sys/netinet/sctp_pcb.c ============================================================================== --- stable/7/sys/netinet/sctp_pcb.c Fri Mar 20 22:17:27 2009 (r190189) +++ stable/7/sys/netinet/sctp_pcb.c Fri Mar 20 23:06:16 2009 (r190190) @@ -3449,7 +3449,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, cnt = 0; if (so) { #ifdef IPSEC - ipsec4_delete_pcbpolicy(ip_pcb); + ipsec_delete_pcbpolicy(ip_pcb); #endif /* IPSEC */ /* Unlocks not needed since the socket is gone now */ Modified: stable/7/sys/netinet6/in6_pcb.c ============================================================================== --- stable/7/sys/netinet6/in6_pcb.c Fri Mar 20 22:17:27 2009 (r190189) +++ stable/7/sys/netinet6/in6_pcb.c Fri Mar 20 23:06:16 2009 (r190190) @@ -424,7 +424,7 @@ in6_pcbfree(struct inpcb *inp) #ifdef IPSEC if (inp->in6p_sp != NULL) - ipsec6_delete_pcbpolicy(inp); + ipsec_delete_pcbpolicy(inp); #endif /* IPSEC */ inp->inp_gencnt = ++ipi->ipi_gencnt; in_pcbremlists(inp); Modified: stable/7/sys/netipsec/ipsec.c ============================================================================== --- stable/7/sys/netipsec/ipsec.c Fri Mar 20 22:17:27 2009 (r190189) +++ stable/7/sys/netipsec/ipsec.c Fri Mar 20 23:06:16 2009 (r190190) @@ -1151,7 +1151,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")); @@ -1241,27 +1241,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 /* Modified: stable/7/sys/netipsec/ipsec.h ============================================================================== --- stable/7/sys/netipsec/ipsec.h Fri Mar 20 22:17:27 2009 (r190189) +++ stable/7/sys/netipsec/ipsec.h Fri Mar 20 23:06:16 2009 (r190190) @@ -373,7 +373,7 @@ extern int ipsec4_set_policy __P((struct caddr_t request, size_t len, struct ucred *cred)); extern int ipsec4_get_policy __P((struct inpcb *inpcb, caddr_t request, size_t len, struct mbuf **mp)); -extern int ipsec4_delete_pcbpolicy __P((struct inpcb *)); +extern int ipsec_delete_pcbpolicy __P((struct inpcb *)); extern int ipsec4_in_reject __P((struct mbuf *, struct inpcb *)); struct secas; Modified: stable/7/sys/netipsec/ipsec6.h ============================================================================== --- stable/7/sys/netipsec/ipsec6.h Fri Mar 20 22:17:27 2009 (r190189) +++ stable/7/sys/netipsec/ipsec6.h Fri Mar 20 23:06:16 2009 (r190190) @@ -51,7 +51,6 @@ extern int ip6_esp_randpad; struct inpcb; -extern int ipsec6_delete_pcbpolicy __P((struct inpcb *)); extern int ipsec6_set_policy __P((struct inpcb *inp, int optname, caddr_t request, size_t len, struct ucred *cred)); extern int ipsec6_get_policy