base-files: ipcalc.sh: Add netmask2prefix function
authorPhilip Prindeville <philipp@redfish-solutions.com>
Sat, 11 Nov 2023 19:37:20 +0000 (12:37 -0700)
committerPhilip Prindeville <philipp@redfish-solutions.com>
Tue, 12 Dec 2023 19:30:35 +0000 (12:30 -0700)
commitdd256099c3fbf48e108381dea8588c38e89cf14a
tree9cda6d3f772b93c24629ac73470b475174513d47
parent6cdc429a484392afb4ca7c8a32355987d9e0cc73
base-files: ipcalc.sh: Add netmask2prefix function

Also add is_contiguous to check if it's a valid netmask.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
package/base-files/files/bin/ipcalc.sh
package/base-files/files/lib/functions/ipv4.sh