Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Mar 2009 23:06:16 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r190190 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netinet netinet6 netipsec
Message-ID:  <200903202306.n2KN6GWE016539@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903202306.n2KN6GWE016539>