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
David, 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. Dan On 6/14/11, David Fifield <david () bamsoftware com> wrote:
I don't like this automatic conversion to IPv4-mapped addresses. I'd prefer 1.2.3.4 and ::ffff:1.2.3.4 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. David
Attachment:
ipOps.patch
Description:
_______________________________________________ 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: [NSE] Bug in get_info() socket info (was bug in broadcast-dns-service-discovery and dnssd.lua), (continued)
- Re: [NSE] Bug in get_info() socket info (was bug in broadcast-dns-service-discovery and dnssd.lua) Djalal Harouni (Jun 09)
- Re: [NSE][patch] Bug in broadcast-dns-service-discovery and dnssd.lua Daniel Miller (Jun 13)
- Re: [NSE][patch] Bug in broadcast-dns-service-discovery and dnssd.lua Djalal Harouni (Jun 13)
- Re: [NSE][patch] Bug in broadcast-dns-service-discovery and dnssd.lua Patrik Karlsson (Jun 13)
- Re: [NSE][patch] Bug in broadcast-dns-service-discovery and dnssd.lua Djalal Harouni (Jun 13)
- Re: [NSE][patch] Bug in broadcast-dns-service-discovery and dnssd.lua Patrik Karlsson (Jun 13)
- Re: [NSE][patch] Bug in broadcast-dns-service-discovery and dnssd.lua Patrik Karlsson (Jun 13)
- Re: [NSE][patch] Bug in broadcast-dns-service-discovery and dnssd.lua Djalal Harouni (Jun 13)
- Re: [NSE][patch] Bug in broadcast-dns-service-discovery and dnssd.lua Daniel Miller (Jun 15)
- Re: [NSE][patch] Bug in broadcast-dns-service-discovery and dnssd.lua Patrik Karlsson (Jun 15)