Forked from
Debian Installer / netcfg
Source project has a limited visibility.
-
Leading or trailing whitespaces are not removed from the IP address, for example, when specified by the user. If the IP address contains whitespaces, parsing the address fails and a malformed address is reported even if the IP address would be valid. To remove trailing whitespaces, extend the rtrim() function to remove multiple spaces. Introduce a new function, strtrim() to remove any leading spaces. Also add a test case to verify the changed behavior. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>