Hi folks,
what do you think of introducing new variable which could define max value for index iterating over PREFIX/NETMASK pair?
Problem:
Now it's hardcoded value of 255 in /etc/sysconfig/network-scripts/network-functions:
expand_config ()
{
local i=0 val
for idx in '' {0..255} ; do
ipaddr[$i]=$(eval echo '$'IPADDR$idx)
if [ -z "${ipaddr[$i]}" ]; then
[ "$idx" ] && [ $idx -ge 2 ] && break
continue
fi
prefix[$i]=$(eval echo '$'PREFIX$idx)
netmask[$i]=$(eval echo '$'NETMASK$idx)
broadcast[$i]=$(eval echo '$'BROADCAST$idx)
arpcheck[$i]=$(eval echo '$'ARPCHECK$idx)
We are running plenty of addresses (over 500) under loopback interface and announcing them as /32 for upstream hosts. With IPv6 everything is OK, because it has already native secondary option.