Fix a mbuf and refcnt leak in the broadcast code.

If the packet is rejected from pfil(9) then continue the loop rather than
returning, this means that we can still try to send it out the remaining
interfaces but more importantly the mbuf is freed and refcount decremented on
exit.
This commit is contained in:
Andrew Thompson 2005-11-13 19:36:59 +00:00
parent d954c733ba
commit bb4b5f54a5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=152392

View File

@ -1871,10 +1871,10 @@ bridge_broadcast(struct bridge_softc *sc, struct ifnet *src_if,
|| inet6_pfil_hook.ph_busy_count >= 0
#endif
)) {
if (bridge_pfil(&m, NULL, dst_if, PFIL_OUT) != 0)
return;
if (m == NULL)
return;
if (bridge_pfil(&mc, NULL, dst_if, PFIL_OUT) != 0)
continue;
if (mc == NULL)
continue;
}
bridge_enqueue(sc, dst_if, mc);