The attached patch fixies this. Radek
On Mon, 2006-01-30 at 09:42 +0100, Radek Vokál wrote: > Hmm, I wonder why this started to happen. It's net-snmp-5.3 on my Fedora > Core 5 system (kernel-2.6.15-1.1854_FC5smp) > > # snmpd -Lo -f > /proc/net/if_inet6 data format error (2!=6), line ==| > 0000:0000:0000:0000:0000:0000:0000:0001 01 80 10 80 lo > | > /proc/net/if_inet6 data format error (2!=6), line ==| > fe80:0000:0000:0000:020f:1fff:fe78:0d18 02 40 20 80 eth0 > | > /proc/net/if_inet6 data format error (2!=6), line ==| > 0000:0000:0000:0000:0000:0000:0000:0001 01 80 10 80 lo > | > /proc/net/if_inet6 data format error (2!=6), line ==| > fe80:0000:0000:0000:020f:1fff:fe78:0d18 02 40 20 80 eth0 > | > /proc/net/if_inet6 data format error (2!=6), line ==| > 0000:0000:0000:0000:0000:0000:0000:0001 01 80 10 80 lo > | > /proc/net/if_inet6 data format error (2!=6), line ==| > fe80:0000:0000:0000:020f:1fff:fe78:0d18 02 40 20 80 eth0 > | > > A clue? > -- Radek Vokál <[EMAIL PROTECTED]>
--- 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);
signature.asc
Description: This is a digitally signed message part
