View | Details | Raw Unified | Return to bug 164369 | Differences between
and this patch

Collapse All | Expand All

(-)sys/net/bridgestp.c (-3 / +10 lines)
Lines 2017-2036 Link Here
2017
	BSTP_LOCK_ASSERT(bs);
2017
	BSTP_LOCK_ASSERT(bs);
2018
2018
2019
	mif = NULL;
2019
	mif = NULL;
2020
	bp = LIST_FIRST(&bs->bs_bplist);
2020
	/*
2021
	/*
2021
	 * Search through the Ethernet adapters and find the one with the
2022
	 * Search through the Ethernet adapters and find the one with the
2022
	 * lowest value. The adapter which we take the MAC address from does
2023
	 * lowest value. Make sure the adapter which we take the MAC address
2023
	 * not need to be part of the bridge, it just needs to be a unique
2024
	 * from is part of this bridge, so we can have more than one independent
2024
	 * value.
2025
	 * bridges in the same STP domain.
2025
	 */
2026
	 */
2026
	IFNET_RLOCK_NOSLEEP();
2027
	IFNET_RLOCK_NOSLEEP();
2027
	TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
2028
	TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
2028
		if (ifp->if_type != IFT_ETHER)
2029
		if (ifp->if_type != IFT_ETHER)
2029
			continue;
2030
			continue;
2030
2031
2032
		if (ifp->if_bridge == NULL || bp == NULL)
2033
			continue;
2034
2031
		if (bstp_addr_cmp(IF_LLADDR(ifp), llzero) == 0)
2035
		if (bstp_addr_cmp(IF_LLADDR(ifp), llzero) == 0)
2032
			continue;
2036
			continue;
2033
2037
2038
		if (ifp->if_bridge != bp->bp_ifp->if_bridge)
2039
			continue;
2040
2034
		if (mif == NULL) {
2041
		if (mif == NULL) {
2035
			mif = ifp;
2042
			mif = ifp;
2036
			continue;
2043
			continue;

Return to bug 164369