diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-05 22:11:38 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-05 22:11:38 +0000 |
commit | 0f999262c29dbc1a7799fb474f5222a074b2ee0c (patch) | |
tree | 4c07259978c58472c194fcf00ffe98a9426d6324 /lib/network/tools.pm | |
parent | 6ba8e8b249dabf6bd00c814cafeec172532fc992 (diff) | |
download | drakx-net-0f999262c29dbc1a7799fb474f5222a074b2ee0c.tar drakx-net-0f999262c29dbc1a7799fb474f5222a074b2ee0c.tar.gz drakx-net-0f999262c29dbc1a7799fb474f5222a074b2ee0c.tar.bz2 drakx-net-0f999262c29dbc1a7799fb474f5222a074b2ee0c.tar.xz drakx-net-0f999262c29dbc1a7799fb474f5222a074b2ee0c.zip |
add is_zeroconf_interface helper
Diffstat (limited to 'lib/network/tools.pm')
-rw-r--r-- | lib/network/tools.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/network/tools.pm b/lib/network/tools.pm index 882060e..840834a 100644 --- a/lib/network/tools.pm +++ b/lib/network/tools.pm @@ -180,6 +180,11 @@ sub is_real_interface { !is_virtual_interface($intf) && !is_vlan_interface($intf); } +sub is_zeroconf_interface { + my ($intf) = @_; + is_virtual_interface($intf) && get_interface_ip_address({}, $intf) =~ /^(127|169\.254)\./; +} + sub get_interface_status { my ($intf) = @_; $intf = get_real_interface($intf); |