svn commit: r243289 - stable/9/sys/net

Ed Maste emaste at FreeBSD.org
Mon Nov 19 17:06:22 UTC 2012


Author: emaste
Date: Mon Nov 19 17:06:21 2012
New Revision: 243289
URL: http://svnweb.freebsd.org/changeset/base/243289

Log:
  MFC r238298: Restore error handling lost in r191603
  
    This was missed in the change from IFQ_ENQUEUE to if_transmit.
  
  MFC r238346: Plug potential mbuf leak when bridging fragments
  
    If an error occurs when transmitting one mbuf in a chain of fragments,
    free the subsequent fragments instead of leaking them.
  
  MFC r238355: Simplify error case
  
    Submitted by:        thompsa@
  
  Sponsored by: ADARA Networks

Modified:
  stable/9/sys/net/if_bridge.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/net/if_bridge.c
==============================================================================
--- stable/9/sys/net/if_bridge.c	Mon Nov 19 16:52:58 2012	(r243288)
+++ stable/9/sys/net/if_bridge.c	Mon Nov 19 17:06:21 2012	(r243289)
@@ -1811,8 +1811,10 @@ bridge_enqueue(struct bridge_softc *sc, 
 			m->m_flags &= ~M_VLANTAG;
 		}
 
-		if (err == 0)
-			dst_ifp->if_transmit(dst_ifp, m);
+		if ((err = dst_ifp->if_transmit(dst_ifp, m))) {
+			m_freem(m0);
+			break;
+		}
 	}
 
 	if (err == 0) {


More information about the svn-src-stable-9 mailing list