svn commit: r339555 - head/sys/net

Andrey V. Elsukov ae at FreeBSD.org
Sun Oct 21 18:30:28 UTC 2018


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 ||


More information about the svn-src-all mailing list