Package: libsnmp-perl Version: 5.7.2.1~dfsg-7 Severity: normal Tags: patch upstream
Hi, When using e.g. gettable (or simply getnext, as far as I can see, but I've only tried with gettable) and a callback, the value of UseEnums is ignored, and you always get just the number. Attached is a simple patch to fix the issue; it seems one just forgot to copy the code to set the right flags from the synchronous path into the callback path. I haven't had luck with upstream responding to patches, so I'm sending it to the BTS in the hope that it gets included for jessie, but it should of course go upstream as well. -- System Information: Debian Release: 7.6 APT prefers stable APT policy: (750, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.3 (SMP w/40 CPU cores) Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages libsnmp-perl depends on: ii libc6 2.13-38+deb7u4 ii libsnmp30 5.7.2.1~dfsg-7 ii libssl1.0.0 1.0.1e-2+deb7u12 ii perl 5.14.2-21+deb7u1 ii perl-base [perlapi-5.14.2] 5.14.2-21+deb7u1 libsnmp-perl recommends no packages. libsnmp-perl suggests no packages. -- no debconf information
--- net-snmp-5.7.2.1~dfsg.orig/perl/SNMP/SNMP.xs +++ net-snmp-5.7.2.1~dfsg/perl/SNMP/SNMP.xs @@ -1300,6 +1300,10 @@ void *cb_data; netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_NUMERIC_OIDS, 1); netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, NETSNMP_OID_OUTPUT_NUMERIC); } + if (SvIV(*hv_fetch((HV*)SvRV(sess_ref),"UseEnums", 8, 1))) + sprintval_flag = USE_ENUMS; + if (SvIV(*hv_fetch((HV*)SvRV(sess_ref),"UseSprintValue", 14, 1))) + sprintval_flag = USE_SPRINT_VALUE; sv_bless(varlist_ref, gv_stashpv("SNMP::VarList",0)); for(vars = (pdu?pdu->variables:NULL); vars; vars = vars->next_variable) {