I found the code which is causing this bug. net-snmp appears to read /proc/net/if_inet6 and assume interface names are 8 characters or fewer. However the limit for interface names is 16 characters currently on linux (as far as I can see)

I've attached a workaround patch.

Cheers

--hachi
--- net-snmp-5.4.1~dfsg.orig/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c
+++ net-snmp-5.4.1~dfsg/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c
@@ -219,7 +219,7 @@
          * F: flags (see include/linux/rtnetlink.h, net/ipv6/addrconf.c)
          * I: interface
          */
-        rc = sscanf(line, "%39s %02x %02x %02x %02x %8s\n",
+        rc = sscanf(line, "%39s %02x %02x %02x %02x %16s\n",
                     addr, &if_index, &pfx_len, &scope, &flags, if_name);
         if( 6 != rc ) {
             snmp_log(LOG_ERR, PROCFILE " data format error (%d!=6), line ==|%s|\n",

Reply via email to