Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 May 2011 13:12:45 +0000 (UTC)
From:      Fabien Thomas <fabient@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r221524 - stable/8/sys/netipsec
Message-ID:  <201105061312.p46DCj1e049441@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fabient
Date: Fri May  6 13:12:45 2011
New Revision: 221524
URL: http://svn.freebsd.org/changeset/base/221524

Log:
  MFC r220194:
  Fix two SA refcount:
   - AH does not release the SA like in ESP/IPCOMP when handling EAGAIN
   - ipsec_process_done incorrectly release the SA.

Modified:
  stable/8/sys/netipsec/ipsec_output.c
  stable/8/sys/netipsec/xform_ah.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/netipsec/ipsec_output.c
==============================================================================
--- stable/8/sys/netipsec/ipsec_output.c	Fri May  6 13:11:50 2011	(r221523)
+++ stable/8/sys/netipsec/ipsec_output.c	Fri May  6 13:12:45 2011	(r221524)
@@ -247,7 +247,6 @@ ipsec_process_done(struct mbuf *m, struc
 	panic("ipsec_process_done");
 bad:
 	m_freem(m);
-	KEY_FREESAV(&sav);
 	return (error);
 }
 

Modified: stable/8/sys/netipsec/xform_ah.c
==============================================================================
--- stable/8/sys/netipsec/xform_ah.c	Fri May  6 13:11:50 2011	(r221523)
+++ stable/8/sys/netipsec/xform_ah.c	Fri May  6 13:12:45 2011	(r221524)
@@ -785,6 +785,7 @@ ah_input_cb(struct cryptop *crp)
 			sav->tdb_cryptoid = crp->crp_sid;
 
 		if (crp->crp_etype == EAGAIN) {
+			KEY_FREESAV(&sav);
 			error = crypto_dispatch(crp);
 			return error;
 		}



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