# HG changeset patch # User gthomas # Date 1137596678 0 # Node ID ced9249cc91668787cfda52afe8c8d12955768f5 # Parent 5d7f57fd1729a8433ef63b1354dbc9fc637d513e Improve SG list overflow check diff --git a/packages/io/eth/current/ChangeLog b/packages/io/eth/current/ChangeLog --- a/packages/io/eth/current/ChangeLog +++ b/packages/io/eth/current/ChangeLog @@ -1,3 +1,8 @@ +2006-01-18 Gary Thomas + + * src/net/eth_drv.c (eth_drv_send): Better check for overflow + of SG list - pointed out by Ferenc Deak + 2005-07-29 Andrew Lunn * src/net/eth_drv.c (eth_drv_recv): Change of type to remove diff --git a/packages/io/eth/current/src/net/eth_drv.c b/packages/io/eth/current/src/net/eth_drv.c --- a/packages/io/eth/current/src/net/eth_drv.c +++ b/packages/io/eth/current/src/net/eth_drv.c @@ -703,7 +703,7 @@ eth_drv_send(struct ifnet *ifp) END_CONSOLE(); } #endif - if ( MAX_ETH_DRV_SG < sg_len ) { + if (m->m_next && (MAX_ETH_DRV_SG <= sg_len)) { #ifdef CYGPKG_IO_ETH_DRIVERS_WARN_NO_MBUFS int needed = 0; struct mbuf *m1;