Hi all,

On Linux, I'm afraid snmpd doesn't respond correct value on ipReasmTimeout.
Currently, it looks at the value of ipReasmTimeout in /proc/net/snmp.
However, it's the number of IP pacakets the kernel is not able to reassmble
because of the timeout. /proc/sys/net/ipv4/ipfrag_time is correct proc file.

Here's the patch for CVS (2007/Feb/20)
I confirmed this patch with linux-2.6.20 and OpenSUSE 10.2.

I didn't any change at agent/mibgroup/mibII/kernel_linux.c where
ipReasmTimeout is got before because I think the value is overridden by
new code, and I fear the modification at the file affects the other objects.
If you think it's necessary to modify that file, please let me know.
I will create a revised patch.

Thank you,
----
Mitsuru Chinen <[EMAIL PROTECTED]>

Index: agent/mibgroup/ip-mib/ip_scalars.c
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/ip-mib/ip_scalars.c,v
retrieving revision 1.1
diff -u -p -r1.1 ip_scalars.c
--- agent/mibgroup/ip-mib/ip_scalars.c  22 Oct 2005 00:24:27 -0000      1.1
+++ agent/mibgroup/ip-mib/ip_scalars.c  20 Feb 2007 11:14:15 -0000
@@ -21,12 +21,19 @@ handle_ipv6IpForwarding(netsnmp_mib_hand
 void
 init_ip_scalars(void)
 {
+    static oid      ipReasmTimeout_oid[] = { 1, 3, 6, 1, 2, 1, 4, 13, 0 };
     static oid      ipv6IpForwarding_oid[] = { 1, 3, 6, 1, 2, 1, 4, 25 };
     static oid      ipv6IpDefaultHopLimit_oid[] =
         { 1, 3, 6, 1, 2, 1, 4, 26, 0 };
 
     DEBUGMSGTL(("ip_scalar", "Initializing\n"));
 
+    netsnmp_register_num_file_instance
+        ("ipReasmTimeout",
+         ipReasmTimeout_oid, OID_LENGTH(ipReasmTimeout_oid),
+         "/proc/sys/net/ipv4/ipfrag_time", ASN_INTEGER,
+         HANDLER_CAN_RONLY, NULL, NULL);
+                                       
     netsnmp_register_scalar(netsnmp_create_handler_registration
                             ("ipv6IpForwarding", handle_ipv6IpForwarding,
                              ipv6IpForwarding_oid,

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to