diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-01-13 10:01:39 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-01-13 10:01:39 -0800 |
commit | 8ec813a09136b167c1ac93cd049c6945ec6acddb (patch) | |
tree | 5649c1fd1b4da79deee38ca9e783135b6475ff2e /lib/Vyatta/Misc.pm | |
parent | c368665647b9ac72efc161c6e291cba8c3674628 (diff) | |
download | vyatta-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-x | lib/Vyatta/Misc.pm | 4 |
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; |