Signed-off-by: Stephen Gran <steve@lobefin.net>
%x{ip addr list}.each do |line|
next unless line =~ /\s+inet/
next if line =~ /scope (link|host)/
- if line =~ /\s+inet\s+(\S+)\/\d\d .*/
+ if line =~ /\s+inet\s+(\S+)\/\d{1,2} .*/
addrs << $1
end
end
%x{ip addr list}.each do |line|
next unless line =~ /\s+inet/
next if line =~ /scope (link|host)/
- if line =~ /\s+inet6\s+(\S+)\/\d\d .*/
+ if line =~ /\s+inet6\s+(\S+)\/\d{1,3} .*/
addrs << $1
end
end