Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: [NSE][patch] Bug in broadcast-dns-service-discovery and dnssd.lua
From: Patrik Karlsson <patrik () cqure net>
Date: Thu, 16 Jun 2011 07:30:51 +0200


On Jun 15, 2011, at 2:11 PM, Daniel Miller wrote:

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


Thanks for the great work Dan! I found another library that wasn't doing ipv6 (wsdd) and fixed it as well.
It's all committed as r24046.

//Patrik

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

<ipOps.patch>_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/

--
Patrik Karlsson
http://www.cqure.net
http://www.twitter.com/nevdull77

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


  By Date           By Thread  

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