Discussion:
[rancid] upgrade to rancid 3.2 from 3.1 and getting error "Use of uninitialized value $norder...."
Jason Humes
2015-03-17 15:19:19 UTC
Permalink
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.

This is an Ubuntu system...any idea what this error is and how to correct?

Thanks

Jason
heasley
2015-03-17 15:25:09 UTC
Permalink
Post by 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().
Jason Humes
2015-03-17 17:59:11 UTC
Permalink
Hi
It would be a device type of cisco.

Thanks


Jason


-----Original Message-----
From: heasley [mailto:***@shrubbery.net]
Sent: Tuesday, March 17, 2015 11:25 AM
To: Jason Humes
Cc: rancid-***@shrubbery.net
Subject: Re: [rancid] upgrade to rancid 3.2 from 3.1 and getting error "Use of uninitialized value $norder...."
Post by 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().
Jason Humes
2015-03-17 19:07:57 UTC
Permalink
Hi
Yes that patch fixed the errors.
Thanks

Jason

-----Original Message-----
From: heasley [mailto:***@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...."
Post by Jason Humes
Hi
It would be a device type of cisco.
does this patch fix it?
Post by Jason Humes
Thanks
Jason
-----Original Message-----
Sent: Tuesday, March 17, 2015 11:25 AM
To: Jason Humes
Subject: Re: [rancid] upgrade to rancid 3.2 from 3.1 and getting error "Use of uninitialized value $norder...."
Post by 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
Loading...