Nmap Development mailing list archives
Re: Consistent IP fields naming in packet.lua
From: David Fifield <david () bamsoftware com>
Date: Fri, 20 Jan 2012 17:26:43 -0800
On Fri, Jan 20, 2012 at 03:46:08PM +0100, Henri Doreau wrote:
Hello, 2012/1/13 Henri Doreau <henri.doreau () greenbone net>:Hello, I've noticed a problem with low level code intended to deal with both IPv4 and IPv6. e.g.: nselib/data/packetdecoders.lua:273 """ if ( not(self.dups[("%s:%s"):format(p.ip_src,st)]) ) then """ This doesn't work with IPv6 packets as p.ip_src is nil, scripts should do: "p.ip_src or packet.toipv6(p.ip6_src)" instead. This is complicated and other fields like ip6 or ip_v already allow to quickly know the IP version of a packet. I would suggest a change in packet.lua to make the library use the same names for identical fields between IPv4 and IPv6. [...]Did anyone had an opportunity to look at the patches? Even if we don't change packet.lua (though I strongly suggest we do), we should at least fix the code which is currently broken with IPv6.
Please commit it. It looks good. David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Consistent IP fields naming in packet.lua Henri Doreau (Jan 13)
- Re: Consistent IP fields naming in packet.lua Henri Doreau (Jan 20)
- Re: Consistent IP fields naming in packet.lua David Fifield (Jan 20)
- Re: Consistent IP fields naming in packet.lua Henri Doreau (Jan 21)
- Re: Consistent IP fields naming in packet.lua David Fifield (Jan 20)
- Re: Consistent IP fields naming in packet.lua Henri Doreau (Jan 20)