Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Feb 1999 11:45:23 -0800 (PST)
From:      Julian Elischer <julian@whistle.com>
To:        Larry Lile <lile@stdio.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Why did this panic?
Message-ID:  <Pine.BSF.3.95.990209113256.5802E-100000@current1.whistle.com>
In-Reply-To: <Pine.BSF.4.05.9902091338150.14147-300000@heathers.stdio.com>

next in thread | previous in thread | raw e-mail | index | archive | help




in line 1248,
subtract 2 from buf_size as well

   1245             m0->m_pkthdr.rcvif = &sc->arpcom.ac_if;
   1246             m0->m_pkthdr.len = ByteCount;
   1247             m0->m_len = 0;
   1248             m0->m_data += 2;
   1249             th = mtod(m0, struct iso88025_header *);


in 1255  you overwrite what you just calculated the line before..
 have you already set up the variables used?
(looks like you have..)
ah it's a 3 way min()

use a MIN macro please..
#define MIN(A,B) (((A) < (B)) ? (A) : (B))
length = MIN(	frame_len,
		MIN(	(RX_BUFFER_LEN - frag_offset),
			(mbuf_size - mbuf_offset))


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.990209113256.5802E-100000>