lime-packages
lime-packages copied to clipboard
lime-app: warn the user when an invalid IPv4 setting is detected
When an invalid IPv4 is set (e.g. for a 10.13.0.0/16 network, the IP currently recognized as invalid are 10.13.0.0, 10.13.0.1, 10.13.255.255), either manually in /etc/config/lime or automatically from MAC address (see comments on main_ipv4_address in packages/lime-docs/files/lime-example), network.lua in packages/lime-system/files/usr/lib/lua/lime/network.lua sets the last valid IP instead (following the example: 10.13.255.254) without warning the user. This fallback IP should not be kept as increases the likeliness of an IP conflict.
A warning is needed both:
- [x] when running
lime-config; - [ ] when setting an IP from the web interface.
Please be aware of the parallel discussion on #301 and #287.
As implemented in #425, now lime-config throws a warning. Is it actually needed to have it in the web interface? @gmarcos87 @nicopace (I'm asking because I'm not familiar with it)
lime-app has a method for setting a new IPv4 which did not work when I tried it (see #327) Anyway, @gmarcos87 @nicopace does it check if the IPv4 is valid or if the output of lime-config contains errors?
@selankon does lime-app still have a way to set the IPv4?