Re: Cannot inject 'cache_handler' before 'table_container

Anders Wallin <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAF2baFe5ckTM4Ccr_vUW041Lt41Za-6N7ustjQsVunycPHw=Gw@mail.gmail.com>
It was a bug in snmpTlstmCertToTSNTable.c

From dbed5e5687c942381c5e7cc0dfddf1cc30904f14 Mon Sep 17 00:00:00 2001
Message-Id: <
dbed5e5687c942381c5e7cc0dfddf1cc30904f14.1524756095.git.wallinux@gmail.com>
From: Anders Wallin <[email protected]>
Date: Thu, 26 Apr 2018 17:21:21 +0200
Subject: [PATCH 1/1] Fix cache handler for snmpTlstmCertToTSNCount

Signed-off-by: Anders Wallin <[email protected]>
---
 .../tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git
a/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.c
b/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.c
index 99452bb39..e1305bc62 100644
---
a/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.c
+++
b/agent/mibgroup/tlstm-mib/snmpTlstmCertToTSNTable/snmpTlstmCertToTSNTable.c
@@ -199,7 +199,7 @@ init_snmpTlstmCertToTSNTable_context(const char
*contextName)
         netsnmp_register_scalar(reg);
         if (cache)
             netsnmp_inject_handler_before(reg,
netsnmp_cache_handler_get(cache),
-                                          "table_container");
+                                          "snmpTlstmCertToTSNCount");
     }

     reg_oid[10] = 2;
-- 
2.17.0


tors 26 apr. 2018 kl 09:24 skrev Anders Wallin <[email protected]>:

> Hi,
> when starting snmpd compiled on the master(5.8) branch I always get this:
>
> "Cannot inject 'cache_handler' before 'table_container': not found
> The handlers are:
>   bulk_to_next
>   serialize
>   scalar
>   instance
>   snmpTlstmCertToTSNCount
> Turning on AgentX master support.
> "
> Has anyone else seen it? Can someone explain why?
>
> I configure with;
>   $ ./configure --prefix=/usr
> --with-persistent-directory=/var/lib/net-snmp --with-mib-modules=smux
> tlstm-mib tsm-mib examples/example examples/notification
> --with-security-modules=tsm --with-transports=TLSTCP DTLSUDP
> --enable-shared --with-defaults --enable-ipv6 --disable-embedded-perl
> --with-perl-modules=no --with-cflags=-g -O2 --without-elf
>
> root@snmp_0_AW_master:~/snmp-test# cat /tmp/snmp/test/snmpd.conf
> com2sec  awnotif  default         public
> com2sec6 awnotif  default         public
>
> group AWGroup v2c awnotif
> view all included .1 80
> access AWGroup "" any noauth exact all all all
>
> master  agentx
> createUser usmuser MD5 kalle123 AES kalle123
> rwuser usmuser
> trapcommunity public
> [snmp] logTimestamp 0
> trapsess -v 3 -e 80001f8880523983647b8b0357 -a MD5 -A kalle123 -x AES -X
> kalle123 -l authPriv -u usmuser udp:172.19.0.2:162
> trapsess -v 3 -e 80001f8880523983647b8b0357 -a MD5 -A kalle123 -x AES -X
> kalle123 -l authPriv -u usmuser udp:172.19.0.3:162
>
> root@snmp_0_AW_master:~/snmp-test# cat /tmp/snmp/test/snmpd.log
> Cannot inject 'cache_handler' before 'table_container': not found
> The handlers are:
>   bulk_to_next
>   serialize
>   scalar
>   instance
>   snmpTlstmCertToTSNCount
> Turning on AgentX master support.
> NET-SNMP version 5.8.pre2
>
> Regards
>
> Anders Wallin
>
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.