From bf4eb6345025620395f3c953c1d171aab6987e18 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Thu, 10 May 2012 18:21:26 -0700 Subject: Fix variable use in last commit --- lib/Vyatta/ioctl.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Vyatta') diff --git a/lib/Vyatta/ioctl.pm b/lib/Vyatta/ioctl.pm index af72d37..b237854 100644 --- a/lib/Vyatta/ioctl.pm +++ b/lib/Vyatta/ioctl.pm @@ -38,7 +38,7 @@ sub get_terminal_size { #Do SIOCGIFFLAGS ioctl in perl sub get_interface_flags { - my $self = shift; + my $name = shift; my $SIOCGIFFLAGS = &SIOCGIFFLAGS; die "SIOCGIFFLAGS not found" @@ -47,7 +47,7 @@ sub get_interface_flags { socket (my $sock, AF_INET, SOCK_DGRAM, 0) or die "open UDP socket failed: $!"; - my $ifreq = pack('a16', $self->{name}); + my $ifreq = pack('a16', $name); ioctl($sock, $SIOCGIFFLAGS, $ifreq) or return; #undef -- cgit v1.2.3