From: Alex Shumsky Date: Fri, 1 Sep 2023 17:51:40 +0000 (+0300) Subject: collectd-mod-ipstatistics: fix handling of long `/proc` lines X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=b5bf5927f70231683262de36276ead1029f524e6;p=openwrt-packages.git 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 [PKG_RELEASE bump added] --- diff --git a/utils/collectd/Makefile b/utils/collectd/Makefile index 5b7d88a48..875307c17 100644 --- a/utils/collectd/Makefile +++ b/utils/collectd/Makefile @@ -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/ \ diff --git a/utils/collectd/patches/932-add-ipstatistics.patch b/utils/collectd/patches/932-add-ipstatistics.patch index e8dd6c5e0..a51a1cb28 100644 --- a/utils/collectd/patches/932-add-ipstatistics.patch +++ b/utils/collectd/patches/932-add-ipstatistics.patch @@ -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)