Right now, alterator-net-eth is enforcing that the final octet of the IP address is not 0 or 255. This assumption is only valid on a /24 network (netmask of 255.255.255.0). In most home environments, this will be the case. Otherwise, it will be an incorrect assumption. For example, a public-facing server will almost never be on a /24 network. Likewise, on a corporate network, the address space may be subnetted in such a way that X.X.X.0 and X.X.X.255 are not the network/broadcast addresses but are just additional available addresses. In both of these examples, the address may be assigned as opposed to chosen and getting a replacement may not be trivial. The proper solution would be to enforce the available addresses based upon the netmask. The easy solution would be to just remove that enforcement altogether, as it's only correct for one particular network mask. I would have provided a patch to do one or both, but I failed to determine exactly where this check is being done. I assumed it was in /usr/bin/alterator-net-functions or /bin/shell-ip-address, but it seems that neither is correct. For now, the workaround I've found is to add the correct address/bits to /etc/net/ifaces/ethX/ipv4address as alterator does not re-validate the address once it's been stored.
Alterator-net-eth uses valid_ipv4addr() from alterator-net-function. This function should be fixed as you described, of course. And apparently valid_ipv4() in libshell should be fixed too. Thanks for your report!
есть планы по исправлению?
commit f59a68de59fbc2b5d00ca3e416bf85df657cae10 Author: Evgeny Sinelnikov <sin@altlinux.ru> Date: Wed Aug 23 13:27:31 2017 +0300 valid_ipv4addr: Allow 0 in last byte IP 198.168.1.0 in subnet 198.168.0.0 is a valid IPv4 address. Well, 255 should be allowed too.
alterator-net-functions-2.1.1-alt1 -> sisyphus: Thu Feb 17 2022 Mikhail Efremov <sem@altlinux> 2.1.1-alt1 - tests: Add test for valid x.x.x.255 ipv4 address. - valid_ipv4addr: Allow 255 in a last byte (closes: #30084).