summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2005-11-13 19:36:59 +0000
committerthompsa <thompsa@FreeBSD.org>2005-11-13 19:36:59 +0000
commit7f6a46605870a6c11d4b56a597133e302285771d (patch)
treef0969d10fe2320c1b7b6aee49a39f4f8ddbaf49a /sys
parent32ef29176760f859ef551644967b61e579f3ffbd (diff)
downloadFreeBSD-src-7f6a46605870a6c11d4b56a597133e302285771d.zip
FreeBSD-src-7f6a46605870a6c11d4b56a597133e302285771d.tar.gz
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_bridge.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 89f7420..e3d5ef6 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -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);
OpenPOWER on IntegriCloud