Nmap Development mailing list archives
Re: AIX libdnet-stripped patch
From: "Peter O'Gorman" <nmap-dev () mlists thewrittenword com>
Date: Mon, 9 Jan 2012 19:43:13 -0600
I managed to send this from an unsubscribed email address, sending a copy to the list. On Tue, Jan 10, 2012 at 01:59:41AM +0100, Djalal Harouni wrote:
On Mon, Jan 09, 2012 at 05:31:33PM -0600, Peter O'Gorman wrote:The most important bit of the patch are the changes to libdnet-stripped/src/eth-ndd.c. Even if you apply nothing else, please apply that.This patch against libdnet-stripped/src/eth-ndd.c contains a possible typo, please look closely at: + char bufc[60]; + int result = 0; + if (len < 60) { + memset(bufc, 0,sizeof(buf)); Third argument of memset() should be: sizeof(bufc)
Ugh, don't know what combination of cut&paste and retyping got that into the patch I sent, sorry, I tested with sizeof(bufc).
That write() call can write an extra zero byte, and the returned result will not reflect the number of written bytes on success. Sorry I don't know AIX, but can you please tell us why are you trying to re-write the eth_send() function ? Thanks.
I understand now, on AIX 6.1 and 7.1 the patch to eth_send is not needed, but it is required on 5.3 and 5.2. Without it I get: Starting Nmap 5.51 ( http://nmap.org ) at 2012-01-10 01:34 UTC WARNING: eth_send of ARP packet returned -1 rather than expected 42 (errno=59: Message too long) WARNING: eth_send of ARP packet returned -1 rather than expected 42 (errno=59: Message too long) Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn Nmap done: 1 IP address (0 hosts up) scanned in 1.70 seconds The write fails with EMSGSIZE for any attempt to write less than the minimum ethernet packet size. Peter -- Peter O'Gorman pogma () thewrittenword com _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: AIX libdnet-stripped patch David Fifield (Jan 09)
- Re: AIX libdnet-stripped patch Peter O'Gorman (Jan 09)
- Re: AIX libdnet-stripped patch David Fifield (Jan 09)
- Re: AIX libdnet-stripped patch Djalal Harouni (Jan 09)
- Re: AIX libdnet-stripped patch Peter O'Gorman (Jan 10)
- <Possible follow-ups>
- Re: AIX libdnet-stripped patch Peter O'Gorman (Jan 09)
- Re: AIX libdnet-stripped patch Peter O'Gorman (Jan 13)
- Re: AIX libdnet-stripped patch Peter O'Gorman (Jan 09)