Date: Mon, 11 Oct 1999 11:08:08 +0200 (SAT) From: Reinier Bezuidenhout <rbezuide@oskar.nanoteq.co.za> To: freebsd-hackers@freebsd.org Subject: More libpcap problems Message-ID: <199910110908.LAA26466@oskar.nanoteq.co.za>
next in thread | raw e-mail | index | archive | help
Hi ... I have an application which uses libpcap ... after running for several weeks normally .. the application coredumps .. I've traced the problem back to libpcap which somehow reads garbage packet information (or is given garbage). Here is a short view of the gdb .. (gdb) p *(struct bpf_hdr *)pkt $2 = {bh_tstamp = {tv_sec = 0, tv_usec = 0}, bh_caplen = 0, bh_datalen = 4294922246, bh_hdrlen = 24577} (gdb) p *pkt $3 = {ts = {tv_sec = 0, tv_usec = 0}, caplen = 0, len = 4294922246} (gdb) Take a look at the bh_datalen and bh_hdrlen ... those values are not ok. The only value which makes sense is the bh_caplen. Should I use that to determine if I should try and examine the packet ??? I've already had to make a change to libpcap where it got stuck in and endless loop after receiving such "bad" data. (It has been submitted in a PR) Thanks Reinier 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?199910110908.LAA26466>