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 188.8.131.52 and ::ffff:184.108.40.206 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
Let me know if you think differently, otherwise all this is fine to
commit with Patrik's later patches.
Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/
Re: [NSE][patch] Bug in broadcast-dns-service-discovery and dnssd.lua David Fifield (Jun 15)
- Re: [NSE] Bug in get_info() socket info (was bug in broadcast-dns-service-discovery and dnssd.lua), (continued)
- Re: [NSE][patch] Bug in broadcast-dns-service-discovery and dnssd.lua Daniel Miller (Jun 15)