collectd-mod-ipstatistics: fix handling of long /proc
lines
`/proc/net/netstat` `TcpExt:` line is 2064 chars long on linux 6.1 Signed-off-by: Alex Shumsky <alexthreed@gmail.com> [PKG_RELEASE bump added]
This commit is contained in:
parent
4299e892de
commit
b5bf5927f7
2 changed files with 4 additions and 4 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=collectd
|
||||
PKG_VERSION:=5.12.0
|
||||
PKG_RELEASE:=47
|
||||
PKG_RELEASE:=48
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://collectd.org/files/ \
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
+
|
||||
+int ipstatistics_read() {
|
||||
+ FILE *fh;
|
||||
+ char buffer[1024];
|
||||
+ char buffer[4096];
|
||||
+ char *fields[19];
|
||||
+ int numfields;
|
||||
+
|
||||
|
@ -56,7 +56,7 @@
|
|||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ while (fgets(buffer, 1024, fh) != NULL) {
|
||||
+ while (fgets(buffer, 4096, fh) != NULL) {
|
||||
+ numfields = strsplit(buffer, fields, 2);
|
||||
+
|
||||
+ if (numfields < 2)
|
||||
|
@ -80,7 +80,7 @@
|
|||
+ }
|
||||
+
|
||||
+ int count_ipext = 0;
|
||||
+ while (fgets(buffer, 1024, fh) != NULL) {
|
||||
+ while (fgets(buffer, 4096, fh) != NULL) {
|
||||
+ numfields = strsplit(buffer, fields, 19);
|
||||
+
|
||||
+ if (numfields < 8)
|
||||
|
|
Loading…
Reference in a new issue