Home page logo

nmap-dev logo Nmap Development mailing list archives

Re: [NSE][patch] Bug in broadcast-dns-service-discovery and dnssd.lua
From: Daniel Miller <bonsaiviking () gmail com>
Date: Wed, 15 Jun 2011 07:11:18 -0500


I don't have a problem with sorting IPv4 first. It makes more sense and
would suprise fewer people. The patch I've attached does just that, and
also includes Patrick's fixes. I left the capability to pass a "family"
argument to ip_to_str, in case anyone needs it, but compare_ip does not
use it any more.


On 6/14/11, David Fifield <david () bamsoftware com> wrote:

I don't like this automatic conversion to IPv4-mapped addresses. I'd
prefer and ::ffff: to compare different, and for one
address family to always sort before the other. How about just prefixing
each binary string with a byte indicating the address family, and then
doing a binary comparison?

left = "\x04" .. ip_to_bin(left)
left = "\x06" .. ip_to_bin(left)

as appropriate. It should have the same output as sockaddr_storage_cmp
in Nbase.

Let me know if you think differently, otherwise all this is fine to
commit with Patrik's later patches.


Attachment: ipOps.patch

Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]