mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +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:
parent
53f64470e4
commit
e976c2c3b9
2 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue