X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=src%2FPVE%2FNetwork.pm;h=0f92e30734d9d799400f63ad5ea8cbffc7756b2d;hp=dd365051f4e8d17be4823520b09fe1201f36969e;hb=f029c1d09292a37bb336ae8dd7c7a747d32ee60c;hpb=d1e490c12f6c5cf22b5ddd7c5dc78bab0950726b diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm index dd36505..0f92e30 100644 --- a/src/PVE/Network.pm +++ b/src/PVE/Network.pm @@ -11,11 +11,11 @@ use POSIX qw(ECONNREFUSED); use Net::IP; -require "sys/ioctl.ph"; use Socket qw(IPPROTO_IP); use constant IFF_UP => 1; use constant IFNAMSIZ => 16; +use constant SIOCGIFFLAGS => 0x8913; # 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); - if (!defined(ioctl($sock, &SIOCGIFFLAGS, $ifreq))) { + if (!defined(ioctl($sock, SIOCGIFFLAGS, $ifreq))) { warn "failed to get interface flags for: $ifname\n"; next; }