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
[ipv4] Allow calculation of default subnet mask
ipv4.c calculates the default subnet mask before calling fetch_ipv4_setting() to retrieve the configured subnet mask (if any). However, as of commit 612f4e7 "[settings] Avoid returning uninitialised data on error in fetch_xxx_setting()", fetch_ipv4_setting() will zero the IP address if the setting does not exist, rather than leaving it unaltered. Fix by fetching the setting first and calculating the default subnet mask only if necessary.
- Loading branch information