Describe the bug
|
int getNetworkInterfaceName(struct sockaddr_storage *dst, char *dev){ |
|
struct route_nfo rnfo; |
|
struct sockaddr_storage src; |
|
bool result=false; |
|
if(dev==NULL) |
|
nping_fatal(QT_3, "getNetworkInterfaceName(): NULL value supplied."); |
|
memset(&rnfo, 0, sizeof(struct route_nfo) ); |
|
memset(&src, 0, sizeof(struct sockaddr_in) ); |
|
result=route_dst(dst, &rnfo, NULL, NULL); |
|
if( result == false ) |
|
return OP_FAILURE; |
|
strncpy( dev, rnfo.ii.devname, 16 ); |
|
return OP_SUCCESS; |
|
} /* End of getSourceAddress() */ |
What's the point of defining
struct sockaddr_storage src
then filling with 16 zeros
memset(&src, 0, sizeof(struct sockaddr_in) );
and not using as 4th parameter in:
result=route_dst(dst, &rnfo, NULL, NULL);
Version info (please complete the following information):
Describe the bug
nmap/nping/utils_net.cc
Lines 496 to 509 in fd80921
What's the point of defining
then filling with 16 zeros
and not using as 4th parameter in:
Version info (please complete the following information):