Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Nov 1998 11:50:00 -0800 (PST)
From:      "Alexander (Sasha) Robinson" <avr@juniper.net>
To:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: misc/8494: sbcheck is broken
Message-ID:  <199811041950.LAA24306@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/8494; it has been noted by GNATS.

From: "Alexander (Sasha) Robinson" <avr@juniper.net>
To: Bill Fenner <fenner@FreeBSD.ORG>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: misc/8494: sbcheck is broken
Date: Wed, 04 Nov 1998 11:44:02 -0800

 Bill Fenner wrote:
 > 
 > I wrote this code when trying to use sbcheck() myself a while ago.
 > Does this do what you want?
 > 
 >   Bill
 > 
 > cvs diff: Diffing .
 > Index: uipc_socket2.c
 > ===================================================================
 > RCS file: /home/ncvs/src/sys/kern/uipc_socket2.c,v
 > retrieving revision 1.39
 > diff -u -r1.39 uipc_socket2.c
 > --- uipc_socket2.c      1998/09/05 13:24:39     1.39
 > +++ uipc_socket2.c      1998/11/03 18:58:16
 > @@ -477,15 +477,17 @@
 >         register struct sockbuf *sb;
 >  {
 >         register struct mbuf *m;
 > +       register struct mbuf *n = 0;
 >         register int len = 0, mbcnt = 0;
 > 
 > -       for (m = sb->sb_mb; m; m = m->m_next) {
 > +       for (m = sb->sb_mb; m; m = n) {
 > +           n = m->m_nextpkt;
 > +           for (; m; m = m->m_next) {
 >                 len += m->m_len;
 >                 mbcnt += MSIZE;
 >                 if (m->m_flags & M_EXT) /*XXX*/ /* pretty sure this is bogus */
 >                         mbcnt += m->m_ext.ext_size;
 > -               if (m->m_nextpkt)
 > -                       panic("sbcheck nextpkt");
 > +           }
 >         }
 >         if (len != sb->sb_cc || mbcnt != sb->sb_mbcnt) {
 >                 printf("cc %d != %d || mbcnt %d != %d\n", len, sb->sb_cc,
 
 Yep, that's it. Thanks for the quick response. I have to admit that when
 I filed this I had only intended to send it to our (Juniper Networks)
 internal gnats database as a placeholder for myself and mistakenly sent
 it out to you. I would have made the bug description a little less flip
 if I had realized where I was sending it :). Hope I didn't offend.
 
 Sasha
 
 -- 
 
 Alexander (Sasha) Robinson
 avr@juniper.net

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811041950.LAA24306>