libifconfig
libifconfig copied to clipboard
libifconfig_get_description(): Confusing code
Investigate if the following section of code is necessary:
} else if (ifr.ifr_buffer.length > descrlen) {
descrlen = ifr.ifr_buffer.length;
continue;
}
I think this tells the next ioctl() call to allocate a larger buffer for the name, but this needs digging into how the SIOCGIFDESCR ioctl() call is implemented.