tcpdump mailing list archives
possible pcap-bpf.c uname usage bug
From: Matthew Luckie <mjl () luckie org nz>
Date: Wed, 15 Sep 2004 19:37:46 +1200
HiThere is code in pcap-bpf.c to set the selectable fd to -1 if it is detected the OS is FreeBSD 4.3 or 4.4
I don't think the check actually successfully detects 4.3 or 4.4, as the osinfo.release parameter will have something like 4.3-RELEASE or 4.4-STABLE in it.
Below is a patch to libpcap-2004.09.14I've not actually tested this code myself due to lack of a FreeBSD release in this era. I used google to search for FreeBSD 4.3 uname and found this, however:
http://www.apsfilter.org/Lists-Archives/apsfilter-help-0207/msg00014.html Sorry in advance if this is a bogus report. Regards Matthew --- pcap-bpf.c.orig Wed Sep 15 19:14:46 2004 +++ pcap-bpf.c Wed Sep 15 19:15:16 2004 @@ -936,8 +936,8 @@ * We can check what OS this is. */ if (strcmp(osinfo.sysname, "FreeBSD") == 0 && - (strcmp(osinfo.release, "4.3") == 0 || - strcmp(osinfo.release, "4.4") == 0)) + (strncmp(osinfo.release, "4.3-", 4) == 0 || + strncmp(osinfo.release, "4.4-", 4) == 0)) p->selectable_fd = -1; else p->selectable_fd = p->fd; - This is the tcpdump-workers list. Visit https://lists.sandelman.ca/ to unsubscribe.
Current thread:
- possible pcap-bpf.c uname usage bug Matthew Luckie (Sep 15)
- Re: possible pcap-bpf.c uname usage bug Guy Harris (Sep 15)