Skip Menu |

This queue is for tickets about the Sys-HostAddr CPAN distribution.

Report information
The Basics
Id: 74106
Status: resolved
Priority: 0/
Queue: Sys-HostAddr

People
Owner: Nobody in particular
Requestors: matt [...] cerebralsynergy.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.95
Fixed in: 0.96



Subject: Interface names not detected in Solaris 10
Date: Wed, 18 Jan 2012 11:31:18 +1100
To: bug-Sys-HostAddr [...] rt.cpan.org
From: Matthew H <matt [...] cerebralsynergy.com>
Hi test script is: use Sys::HostAddr; use Data::Dumper; my $sysaddr = Sys::HostAddr->new(); my $aref = $sysaddr->ip(); print Dumper($aref); Output causes warnings: Use of uninitialized value in hash element at /opt/IBM/site/perl5/lib/site_perl/Sys/HostAddr.pm line 135. Use of uninitialized value in hash element at /opt/IBM/site/perl5/lib/site_perl/Sys/HostAddr.pm line 135. Looks like line 120 in HostAddr.pm: if($line =~ /^([^\s:]+):?\s+/){ Isn't matching matching interfaces in Solaris, as the names can have colons in them. My workaround fix is: if($line =~ /^(\S+)\s+flags/){ $interface = $1; $interface =~ s/:$//; Which seems to work under RHEL and Solaris, but I don't know about any other platforms. Also not sure if having sub interface number in the name is desired. Cheers, -Matt
can you attach an 'ifconfig -a' ? Sys::HostAddr 0.95 works fine on my Solaris 10 & Solaris 7
Subject: Re: [rt.cpan.org #74106] Interface names not detected in Solaris 10
Date: Tue, 15 May 2012 21:31:19 +1000
To: bug-Sys-HostAddr [...] rt.cpan.org
From: Matthew H <matt [...] cerebralsynergy.com>
I can try and get one for you this week. Is your Solaris 10 running in a zone? Maybe that's the problem - this was tested in a sparse zone. On 15 May 2012 16:45, Jeremy Kister via RT <bug-Sys-HostAddr@rt.cpan.org>wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=74106 > > > > can you attach an 'ifconfig -a' ? > > > Sys::HostAddr 0.95 works fine on my Solaris 10 & Solaris 7 > > >
On Tue May 15 07:31:37 2012, matt@cerebralsynergy.com wrote: Show quoted text
> I can try and get one for you this week.
perfect. Show quoted text
> Is your Solaris 10 running in a zone? Maybe that's the problem - this > was > tested in a sparse zone.
nope; that might the the problem. I keep track of the formats in the NOTES file - I'll have to add one for zones! 0.96, however, does support colons in interface names (to support virtual interfaces not having to do with zones), so the problem may be inadvertently solved.