]> git.proxmox.com Git - pve-common.git/commitdiff
network: get rid of ioctl.ph
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 12 Feb 2016 09:42:54 +0000 (10:42 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 12 Feb 2016 10:17:20 +0000 (11:17 +0100)
src/PVE/Network.pm

index dd365051f4e8d17be4823520b09fe1201f36969e..0f92e30734d9d799400f63ad5ea8cbffc7756b2d 100644 (file)
@@ -11,11 +11,11 @@ use POSIX qw(ECONNREFUSED);
 
 use Net::IP;
 
 
 use Net::IP;
 
-require "sys/ioctl.ph";
 use Socket qw(IPPROTO_IP);
 
 use constant IFF_UP => 1;
 use constant IFNAMSIZ => 16;
 use Socket qw(IPPROTO_IP);
 
 use constant IFF_UP => 1;
 use constant IFNAMSIZ => 16;
+use constant SIOCGIFFLAGS => 0x8913;
 
 # host network related utility functions
 
 
 # host network related utility functions
 
@@ -538,7 +538,7 @@ sub get_active_interfaces {
        next if $line !~ /^\s*([^:\s]+):/;
        my $ifname = $1;
        my $ifreq = pack($STRUCT_IFREQ_SIOCGIFFLAGS, $1, 0);
        next if $line !~ /^\s*([^:\s]+):/;
        my $ifname = $1;
        my $ifreq = pack($STRUCT_IFREQ_SIOCGIFFLAGS, $1, 0);
-       if (!defined(ioctl($sock, &SIOCGIFFLAGS, $ifreq))) {
+       if (!defined(ioctl($sock, SIOCGIFFLAGS, $ifreq))) {
            warn "failed to get interface flags for: $ifname\n";
            next;
        }
            warn "failed to get interface flags for: $ifname\n";
            next;
        }