Mercurial > ecos
changeset 2118:ced9249cc916
Improve SG list overflow check
| author | gthomas |
|---|---|
| date | Wed, 18 Jan 2006 15:04:38 +0000 |
| parents | 5d7f57fd1729 |
| children | 1406c9fadbf3 |
| files | packages/io/eth/current/ChangeLog packages/io/eth/current/src/net/eth_drv.c |
| diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/io/eth/current/ChangeLog +++ b/packages/io/eth/current/ChangeLog @@ -1,3 +1,8 @@ +2006-01-18 Gary Thomas <gary@mlbassoc.com> + + * 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 <andrew.lunn@ascom.ch> * src/net/eth_drv.c (eth_drv_recv): Change of type to remove
--- 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;
