summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Misc.pm
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-01-13 10:01:39 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-01-13 10:01:39 -0800
commit8ec813a09136b167c1ac93cd049c6945ec6acddb (patch)
tree5649c1fd1b4da79deee38ca9e783135b6475ff2e /lib/Vyatta/Misc.pm
parentc368665647b9ac72efc161c6e291cba8c3674628 (diff)
downloadvyatta-cfg-8ec813a09136b167c1ac93cd049c6945ec6acddb.tar.gz
vyatta-cfg-8ec813a09136b167c1ac93cd049c6945ec6acddb.zip
Ignore IPV6 addresses in getInterfacesIPadresses
This routine is used by DHCP server and needs to ignore IPV6 addresses. NB: Does not fix bogus spellung.
Diffstat (limited to 'lib/Vyatta/Misc.pm')
-rwxr-xr-xlib/Vyatta/Misc.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Vyatta/Misc.pm b/lib/Vyatta/Misc.pm
index 60c50b4..a7bd075 100755
--- a/lib/Vyatta/Misc.pm
+++ b/lib/Vyatta/Misc.pm
@@ -104,7 +104,7 @@ my %type_hash = (
'pointtopoint' => IFF_POINTOPOINT,
);
-# getInterfacesIPadresses() returns IP addresses for the interface type passed to it
+# getInterfacesIPadresses() returns IPv4 addresses for the interface type
# possible type of interfaces : 'broadcast', 'pointopoint', 'multicast', 'all'
# the loopback IP address is never returned with any of the above parameters
sub getInterfacesIPadresses {
@@ -126,7 +126,7 @@ sub getInterfacesIPadresses {
my $flags = $intf->flags();
next if ($flags & IFF_LOOPBACK);
- my @addresses = $intf->address();
+ my @addresses = $intf->address(4);
push @ips, @addresses;
}
return @ips;