Nmap Development mailing list archives

libpcap bug workaround for localhost? (Re: pcap_dispatch() returns outgoing packet despite pcap_setfilter)


From: Martin Mačok <martin.macok () underground cz>
Date: Fri, 14 Jan 2005 16:05:56 +0100

On Sun, Jan 09, 2005 at 12:03:39PM +0100, Martin Mačok wrote:

Could someone explain why nmap_main() -> nexthost() -> massping() ->
get_ping_results() -> readip_pcap() -> pcap_next() -> pcap_dispatch()
returns "TCP 127.0.0.1:34206 > 127.0.0.1:80 A" despite the packet
capture filter that shouldn't match it?

Hm, I've found it in tcpip.cc:

[..]
void set_pcap_filter(...
[..]
  if (o.debugging)
    log_write(LOG_STDOUT, "Packet capture filter (device %s): %s\n", target->device, buf);
  
  /* Due to apparent bug in libpcap */
  if (islocalhost(target->v4hostip()))
    buf[0] = '\0';
[..]

OK, so, at least, the order of those commands should be reversed.
Second, what is (was?) the bug? It seems to work good on my localhost,
is this workaround still needed?

Martin Mačok
ICT Security Consultant

P.S. Other list subscribers: Do you get "thank you for contanting XY
support"-style junk autoreplies when you post to this list, too?

---------------------------------------------------------------------
For help using this (nmap-dev) mailing list, send a blank email to 
nmap-dev-help () insecure org . List archive: http://seclists.org



Current thread: