Date: Thu, 11 Apr 2002 15:49:35 -0700 From: Maksim Yevmenkin <myevmenk@digisle.net> To: Jeffrey Hsu <hsu@FreeBSD.org> Cc: current@FreeBSD.org, net@FreeBSD.org Subject: Re: Bug in m_split() ? Message-ID: <3CB612FF.2B05330F@digisle.net> References: <0GUF00L9TDCRFW@mta7.pltn13.pbi.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello Jeffrey, > Please try out this patch instead. > > Index: uipc_mbuf.c > =================================================================== > RCS file: /home/cvs/src/sys/kern/uipc_mbuf.c,v > retrieving revision 1.90 > diff -u -6 -r1.90 uipc_mbuf.c > --- uipc_mbuf.c 5 Feb 2002 02:00:53 -0000 1.90 > +++ uipc_mbuf.c 11 Apr 2002 22:31:32 -0000 > @@ -585,14 +585,16 @@ > /* m can't be the lead packet */ > MH_ALIGN(n, 0); > n->m_next = m_split(m, len, wait); > if (n->m_next == NULL) { > (void) m_free(n); > return (NULL); > - } else > + } else { > + n->m_len = 0; > return (n); > + } > } else > MH_ALIGN(n, remain); > } else if (remain == 0) { > n = m->m_next; > m->m_next = NULL; > return (n); it does _exactly_ the same thing as patch i sent. the idea is to set "n->m_len" to zero. in this particular part of the code "n" is not modified. only "n->m_next". so i do not see any difference except your patch is 4 lines :) --- uipc_mbuf.c.orig Mon Apr 8 14:40:23 2002 +++ uipc_mbuf.c Mon Apr 8 14:40:43 2002 @@ -584,6 +584,7 @@ if (remain > MHLEN) { /* m can't be the lead packet */ MH_ALIGN(n, 0); + n->m_len = 0; n->m_next = m_split(m, len, wait); if (n->m_next == NULL) { (void) m_free(n); thanks, max To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3CB612FF.2B05330F>