Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Oct 2018 18:30:27 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339555 - head/sys/net
Message-ID:  <201810211830.w9LIURLt094462@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Sun Oct 21 18:30:27 2018
New Revision: 339555
URL: https://svnweb.freebsd.org/changeset/base/339555

Log:
  Follow the fix in r339532 (by glebius):
    Fix exiting an epoch(9) we never entered. May happen only with MAC.
  
  MFC after:	1 month

Modified:
  head/sys/net/if_ipsec.c

Modified: head/sys/net/if_ipsec.c
==============================================================================
--- head/sys/net/if_ipsec.c	Sun Oct 21 18:24:20 2018	(r339554)
+++ head/sys/net/if_ipsec.c	Sun Oct 21 18:30:27 2018	(r339555)
@@ -323,6 +323,7 @@ ipsec_transmit(struct ifnet *ifp, struct mbuf *m)
 	uint32_t af;
 	int error;
 
+	IPSEC_RLOCK();
 #ifdef MAC
 	error = mac_ifnet_check_transmit(ifp, m);
 	if (error) {
@@ -331,7 +332,6 @@ ipsec_transmit(struct ifnet *ifp, struct mbuf *m)
 	}
 #endif
 	error = ENETDOWN;
-	IPSEC_RLOCK();
 	sc = ifp->if_softc;
 	if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 ||
 	    (ifp->if_flags & IFF_MONITOR) != 0 ||



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