On Fri, May 03, 2019 at 07:58:04PM +0000, Lévai, Dániel wrote:
> So it seems that by flushing the pass/block rules from the bridge(4) the
> leak has been plugged on this router.
> 

Please try the following diff. This is fixing a obvious mem leak in one
special case (this may be why you did not notice it on the other system).

-- 
:wq Claudio

Index: if_bridge.c
===================================================================
RCS file: /cvs/src/sys/net/if_bridge.c,v
retrieving revision 1.329
diff -u -p -r1.329 if_bridge.c
--- if_bridge.c 3 May 2019 16:53:07 -0000       1.329
+++ if_bridge.c 8 May 2019 22:42:48 -0000
@@ -808,6 +808,10 @@ bridge_enqueue(struct ifnet *ifp, struct
                            (m->m_flags & (M_BCAST | M_MCAST)) == 0)
                                continue;
 
+                       if (bridge_filterrule(&bif->bif_brlout, eh, m) ==
+                           BRL_ACTION_BLOCK)
+                               continue;
+
                        if (SLIST_NEXT(bif, bif_next) == NULL) {
                                used = 1;
                                mc = m;
@@ -819,10 +823,6 @@ bridge_enqueue(struct ifnet *ifp, struct
                                }
                        }
 
-                       if (bridge_filterrule(&bif->bif_brlout, eh, mc) ==
-                           BRL_ACTION_BLOCK)
-                               continue;
-
                        error = bridge_ifenqueue(brifp, dst_if, mc);
                        if (error)
                                continue;
@@ -1249,7 +1249,8 @@ bridge_broadcast(struct bridge_softc *sc
                if (protected != 0 && (protected & bif->bif_protected))
                        continue;
 
-               if (bridge_filterrule(&bif->bif_brlout, eh, m) == 
BRL_ACTION_BLOCK)
+               if (bridge_filterrule(&bif->bif_brlout, eh, m) ==
+                   BRL_ACTION_BLOCK)
                        continue;
 
                /*

Reply via email to