summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Misc.pm
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@io.vyatta.com>2008-12-12 13:03:19 -0800
committerStig Thormodsrud <stig@io.vyatta.com>2008-12-12 13:03:19 -0800
commitbfcc2655d34a1e2030711fbb46a408d99c7116fc (patch)
tree557e8b487de15ce9e1744b09ec060b42121b90b4 /lib/Vyatta/Misc.pm
parent35b02c56e7e5ce465ae63e099eba7ab74b78e029 (diff)
downloadvyatta-cfg-bfcc2655d34a1e2030711fbb46a408d99c7116fc.tar.gz
vyatta-cfg-bfcc2655d34a1e2030711fbb46a408d99c7116fc.zip
Fix 3991: Unable to configure DHCP server on a multinetted interfaceZ
Diffstat (limited to 'lib/Vyatta/Misc.pm')
-rwxr-xr-xlib/Vyatta/Misc.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Vyatta/Misc.pm b/lib/Vyatta/Misc.pm
index 77bba36..b99bc22 100755
--- a/lib/Vyatta/Misc.pm
+++ b/lib/Vyatta/Misc.pm
@@ -119,10 +119,12 @@ sub getInterfacesIPadresses {
$is_intf_interface_type = 1;
}
if ($is_intf_interface_type > 0) {
- $intf_ips[$intf_ips_index] =
+ my @ips = ();
+ @ips =
`ip addr show $intf_system 2>/dev/null | grep inet | grep -v inet6 | awk '{print \$2}'`;
- if (!($intf_ips[$intf_ips_index] eq '')){
- $intf_ips_index++;
+ chomp @ips;
+ if (scalar(@ips) > 0){
+ push @intf_ips, @ips;
}
}
}