Welcome, Guest. Please login or register.

Author Topic: Bug in 1.0.7 CDP discovery on CatOS devices  (Read 1816 times)

pluto01

  • Guest
Bug in 1.0.7 CDP discovery on CatOS devices
« on: April 19, 2012, 10:47:53 PM »
There looks like a bug in CDP discovery in 1.0.7. It looks like this code bit was put in as a fix for Nexus devices which were having the opposite problem in the beta. I think the patch is appropriate, just a } in the wrong place. It seems to fix the problem for me.  ;D

-Brian

Code: [Select]
--- libsnmp.pm.dist     Wed Apr 18 13:52:13 2012
+++ libsnmp.pm  Thu Apr 19 14:53:45 2012
@@ -1415,7 +1415,7 @@
                                        my $nebid = &misc::Strip($val);
                                        $neb{$k[14]}{$k[15]}{'id'} = $nebid;
                                        $neb{$k[14]}{$k[15]}{'na'} = $nebid;
-                                       if($lneb{"1.3.6.1.4.1.9.9.23.1.2.1.1.8.$k[14].$k[15]" =~ /^WS-C/}){
+                                       if($lneb{"1.3.6.1.4.1.9.9.23.1.2.1.1.8.$k[14].$k[15]"} =~ /^WS-C/){
                                                $neb{$k[14]}{$k[15]}{'na'} =~ s/(.*?)\((.*?)\)/$2/;                     # Extract from CatOS
                                        }else{
                                                $neb{$k[14]}{$k[15]}{'na'} =~ s/(.*?)\((.*?)\)/$1/;                     # Extract from other (e.g. NxK)

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2695
    • View Profile
    • NeDi
Re: Bug in 1.0.7 CDP discovery on CatOS devices
« Reply #1 on: April 20, 2012, 06:27:59 PM »
Oops, definitely lousy code  ??? Thanks!
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

ablkshrt1

  • Guest
Re: Bug in 1.0.7 CDP discovery on CatOS devices
« Reply #2 on: May 07, 2012, 10:50:39 PM »
So is the above quoted code correct or incorrect.  I am not a programmer, so I wouldn't know what I was looking at.

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2695
    • View Profile
    • NeDi
Re: Bug in 1.0.7 CDP discovery on CatOS devices
« Reply #3 on: May 09, 2012, 09:42:16 PM »
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo