Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[network] Improve network interface availability checking
The buffer used for constructing sysfs path from interface name is rather short, which can lead to false negatives due to truncation. Additionally the actual names of the interfaces checked are not logged in case of errors and the helper function can crash if fed null strings. Make the check_interface() helper function tolerate null arguments and enlarge the path expansion buffer to make truncation less likely. In case get_interface() fails to find valid a interface name, make it emit diagnostic message that identifies the actual names attempted. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
- Loading branch information