1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 21:21:31 +00:00
Files
nmap/nbase
david 2e8f418d2c Remove byte order dependency in in_addr_to_octets.
Because in_addr is stored in network byte order, this function could
extract the octets in MSB-to-LSB order or in LSB-to-MSB order. This
didn't matter in the case of resolved names, because the same order was
used when generating the octet array and later when matching against it.
But the function parse_ipv4_ranges, which handles literal IPv4
addresses, always uses octet[0] as the MSB, so comparisons failed in
later matching.

As it was, the code worked on little-endian architectures but didn't on
big-endian.
2012-04-17 04:36:08 +00:00
..