936e0f
diff -urNp orig/agent/mibgroup/sctp-mib/sctpScalars_linux.c new/agent/mibgroup/sctp-mib/sctpScalars_linux.c
936e0f
--- orig/agent/mibgroup/sctp-mib/sctpScalars_linux.c	2016-08-25 09:18:55.239801239 +0200
936e0f
+++ new/agent/mibgroup/sctp-mib/sctpScalars_linux.c	2016-08-25 10:37:02.416999975 +0200
936e0f
@@ -84,17 +84,17 @@ netsnmp_access_sctp_stats_arch_load(nets
936e0f
             return -1;
936e0f
         }
936e0f
 
936e0f
-        if (line[6] == 'r')
936e0f
+        if (line[4] == 'C' && line[8] == 'E')
936e0f
             sctp_stats->curr_estab = value;
936e0f
-        else if (line[5] == 'c')
936e0f
+        else if (line[4] == 'A' && line[10] == 'E')
936e0f
             sctp_stats->active_estabs = value;
936e0f
-        else if (line[4] == 'P')
936e0f
+        else if (line[4] == 'P' && line[11] == 'E')
936e0f
             sctp_stats->passive_estabs = value;
936e0f
-        else if (line[5] == 'b')
936e0f
+        else if (line[4] == 'a' && line[5] == 'b')
936e0f
             sctp_stats->aborteds = value;
936e0f
-        else if (line[4] == 'S')
936e0f
+        else if (line[4] == 'S' && line[5] == 'h')
936e0f
             sctp_stats->shutdowns = value;
936e0f
-        else if (line[8] == 'f')
936e0f
+        else if (line[4] == 'O' && line[9] == 'B')
936e0f
             sctp_stats->out_of_blues = value;
936e0f
         else if (line[6] == 'e')
936e0f
             sctp_stats->checksum_errors = value;
936e0f
@@ -113,7 +113,7 @@ netsnmp_access_sctp_stats_arch_load(nets
936e0f
                 sctp_stats->out_sctp_packs.high = value >> 32;
936e0f
             } else
936e0f
                 ret = -1;
936e0f
-        } else {
936e0f
+        } else if (line[4] == 'I'){
936e0f
             if (line[6] == 'C') {
936e0f
                 sctp_stats->in_ctrl_chunks.low = value & 0xffffffff;
936e0f
                 sctp_stats->in_ctrl_chunks.high = value >> 32;
936e0f
@@ -123,24 +123,27 @@ netsnmp_access_sctp_stats_arch_load(nets
936e0f
             } else if (line[6] == 'U') {
936e0f
                 sctp_stats->in_unorder_chunks.low = value & 0xffffffff;
936e0f
                 sctp_stats->in_unorder_chunks.high = value >> 32;
936e0f
-            } else if (line[4] == 'F') {
936e0f
-                sctp_stats->frag_usr_msgs.low = value & 0xffffffff;
936e0f
-                sctp_stats->frag_usr_msgs.high = value >> 32;
936e0f
-            } else if (line[4] == 'R') {
936e0f
-                sctp_stats->reasm_usr_msgs.low = value & 0xffffffff;
936e0f
-                sctp_stats->reasm_usr_msgs.high = value >> 32;
936e0f
             } else if (line[6] == 'S') {
936e0f
                 sctp_stats->in_sctp_packs.low = value & 0xffffffff;
936e0f
                 sctp_stats->in_sctp_packs.high = value >> 32;
936e0f
-            } else
936e0f
+            } else {
936e0f
                 ret = -1;
936e0f
+	    }
936e0f
+	} else if (line[4] == 'F' && line[8] == 'U') {
936e0f
+	    sctp_stats->frag_usr_msgs.low = value & 0xffffffff;
936e0f
+	    sctp_stats->frag_usr_msgs.high = value >> 32;
936e0f
+	} else if (line[4] == 'R') {
936e0f
+	    sctp_stats->reasm_usr_msgs.low = value & 0xffffffff;
936e0f
+	    sctp_stats->reasm_usr_msgs.high = value >> 32;
936e0f
+	} else if (line[4] == 'T') {
936e0f
+	} else {
936e0f
+	    ret = -1;
936e0f
         }
936e0f
 
936e0f
         if (ret < 0) {
936e0f
             DEBUGMSGTL(("sctp:scalars:stats:arch_load",
936e0f
-                        "Unknown entry!'\n"));
936e0f
-            fclose(f);
936e0f
-            return ret;
936e0f
+                        "Unknown entry: %s\n", line));
936e0f
+            ret = 0;
936e0f
         }
936e0f
     }
936e0f