Integrate changes from r353292 of the FreeBSD tree.
diff --git a/usrsctplib/netinet/sctp_bsd_addr.c b/usrsctplib/netinet/sctp_bsd_addr.c
index e053c4d..2cb2ac8 100755
--- a/usrsctplib/netinet/sctp_bsd_addr.c
+++ b/usrsctplib/netinet/sctp_bsd_addr.c
@@ -34,7 +34,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp_bsd_addr.c 342872 2019-01-09 01:11:19Z glebius $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctp_bsd_addr.c 353292 2019-10-07 22:40:05Z glebius $");
#endif
#include <netinet/sctp_os.h>
@@ -569,6 +569,7 @@
* any IFA that exists as we float through the
* list of IFA's
*/
+ struct epoch_tracker et;
struct ifnet *ifn;
struct ifaddr *ifa;
struct sctp_ifa *sctp_ifa;
@@ -578,14 +579,12 @@
#endif
IFNET_RLOCK();
+ NET_EPOCH_ENTER(et);
CK_STAILQ_FOREACH(ifn, &MODULE_GLOBAL(ifnet), if_link) {
- struct epoch_tracker et;
-
if (sctp_is_desired_interface_type(ifn) == 0) {
/* non desired type */
continue;
}
- NET_EPOCH_ENTER(et);
CK_STAILQ_FOREACH(ifa, &ifn->if_addrhead, ifa_link) {
if (ifa->ifa_addr == NULL) {
continue;
@@ -638,8 +637,8 @@
sctp_ifa->localifa_flags &= ~SCTP_ADDR_DEFER_USE;
}
}
- NET_EPOCH_EXIT(et);
}
+ NET_EPOCH_EXIT(et);
IFNET_RUNLOCK();
}
#endif