mirror of
https://github.com/nmap/nmap.git
synced 2026-01-04 13:49:03 +00:00
Don't call htonl on a netmask before displaying it in --iflist; it's
already in network byte order. This bug made any mask that wasn't /32 appear as /0.
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
[NOT YET RELEASED]
|
||||
|
||||
o Fixed the display of route netmask bits in --iflist. Formerly, any
|
||||
mask that was not /32 was shown as /0. [David]
|
||||
|
||||
o Fixed an assertion failure:
|
||||
nsock_core.c:199: socket_count_write_dec: Assertion `(iod->writesd_count)
|
||||
> 0' failed.
|
||||
|
||||
@@ -448,7 +448,7 @@ int print_iflist(void) {
|
||||
Tbl->addItem(0, devcol, false, "DEV", 3);
|
||||
Tbl->addItem(0, gwcol, false, "GATEWAY", 7);
|
||||
for (i = 0; i < numroutes; i++) {
|
||||
mask_nbo = htonl(routes[i].netmask);
|
||||
mask_nbo = routes[i].netmask;
|
||||
addr_mtob(&mask_nbo, sizeof(mask_nbo), &nbits);
|
||||
assert(nbits <= 32);
|
||||
ia.s_addr = routes[i].dest;
|
||||
|
||||
Reference in New Issue
Block a user