Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > c0394d3068b44395994f031447c8052d > files > 8

net-snmp-5.3.2.2-7.el5_4.2.src.rpm

--- net-snmp-5.3/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c.proc_if	2005-10-31 05:27:37.000000000 +0100
+++ net-snmp-5.3/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c	2006-01-30 11:32:21.000000000 +0100
@@ -180,7 +180,7 @@
 _load_v6(netsnmp_container *container, int idx_offset)
 {
     FILE           *in;
-    char            line[80], addr[33], if_name[IFNAMSIZ];
+    char            line[80], addr[40], if_name[IFNAMSIZ];
     u_char          *buf;
     int             if_index, pfx_len, scope, flags, rc = 0;
     size_t          in_len, out_len;
@@ -219,7 +219,7 @@
          * F: flags (see include/linux/rtnetlink.h, net/ipv6/addrconf.c)
          * I: interface
          */
-        rc = sscanf(line, "%32s %02x %02x %02x %02x %8s\n",
+        rc = sscanf(line, "%39s %02x %02x %02x %02x %8s\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",
@@ -241,8 +241,9 @@
         netsnmp_assert(16 == in_len);
         out_len = 0;
         buf = entry->ia_address;
-        if(1 != snmp_hex_to_binary(&buf,
-                                   &in_len, &out_len, 0, addr)) {
+/*        if(1 != snmp_hex_to_binary(&buf,
+                                   &in_len, &out_len, 0, addr)) {*/
+	if (1 != netsnmp_hex_to_binary(&buf, &in_len, &out_len, 0, addr, ":")) {
             snmp_log(LOG_ERR,"error parsing '%s', skipping\n",
                      entry->ia_address);
             netsnmp_access_ipaddress_entry_free(entry);