mailing list archives
Re: [nmap-svn] r28412 - nmap/nsock/src
From: David Fifield <david () bamsoftware com>
Date: Sat, 7 Apr 2012 11:22:49 -0700
On Sat, Apr 07, 2012 at 03:29:13PM +0200, Henri Doreau wrote:
2012/4/5 <commit-mailer () insecure org>:
Date: Wed Apr 4 20:30:09 2012
New Revision: 28412
Don't try to do FD_ISSET on a nonselectable pcap descriptor.
The Nsock select engine stores readiness information in a mask instead
of doing an FD_ISSET against the descriptor every time. This is a good
idea, but it removed a special case in the pre-engines code: in case
PCAP_CAN_DO_SELECT is not defined, we can't do FD_ISSET on the
descriptor because it is -1. Here we check for that occurrence and set
EV_READ in the mask so that a non-blocking pcap read can happen every
good catch! How did you noticed/reproduced the problem?
There was a segfault when doing IPv6 OS scan. Probably NSE scripts using
pcap would have uncovered it too.
I'm starting to think that regression tests for nsock would be nice
(at least to compare the impact of a change on all these different
platforms we support). Does anyone has ideas about good designs and
technologies to use for such tests for a C library?
I know of a couple, but haven't really used them.
You may also be able to take inspiration from ncat-test.
Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/