[rancid] upgrade to rancid 3.2 from 3.1 and getting error "Use of uninitialized value $norder...."
Jason Humes
JHumes at acs.on.ca
Tue Mar 17 19:07:57 UTC 2015
Hi
Yes that patch fixed the errors.
Thanks
Jason
-----Original Message-----
From: heasley [mailto:heas at shrubbery.net]
Sent: Tuesday, March 17, 2015 2:55 PM
To: Jason Humes
Cc: heasley
Subject: Re: [rancid] upgrade to rancid 3.2 from 3.1 and getting error "Use of uninitialized value $norder...."
Tue, Mar 17, 2015 at 05:59:11PM +0000, Jason Humes:
> Hi
> It would be a device type of cisco.
does this patch fix it?
> Thanks
>
>
> Jason
>
>
> -----Original Message-----
> From: heasley [mailto:heas at shrubbery.net]
> Sent: Tuesday, March 17, 2015 11:25 AM
> To: Jason Humes
> Cc: rancid-discuss at shrubbery.net
> Subject: Re: [rancid] upgrade to rancid 3.2 from 3.1 and getting error "Use of uninitialized value $norder...."
>
> Tue, Mar 17, 2015 at 03:19:19PM +0000, Jason Humes:
> > Hi
> > Just upgraded our rancid from 3.1 to 3.2 and now getting this error
> > in the logs;
> >
> > Use of uninitialized value $norder in unpack at /home/rancid/lib/rancid/rancid.pm line 378, <INPUT> line 1971.
>
> do you know what device type is generating the error? i think its a bug in the script calling ipsort().
Index: lib/rancid.pm.in
===================================================================
--- lib/rancid.pm.in (revision 3065)
+++ lib/rancid.pm.in (working copy)
@@ -366,7 +366,9 @@
$l = 128;
}
$norder = inet_pton(AF_INET6, $a);
- return unpack("H*", $norder) . unpack("H*", pack("C", $l));
+ if (defined($norder)) {
+ return unpack("H*", $norder) . unpack("H*", pack("C", $l));
+ }
} else {
my($l);
if ($a =~ /\//) {
@@ -375,7 +377,9 @@
$l = 32;
}
$norder = inet_pton(AF_INET, $a);
- return(unpack("H*", $norder) . unpack("H*", pack("C", $l)));
+ if (defined($norder)) {
+ return(unpack("H*", $norder) . unpack("H*", pack("C", $l)));
+ }
}
# otherwise return the original key value, so as not to sort on null
More information about the Rancid-discuss
mailing list