aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoreugen <eugen@FreeBSD.org>2018-07-27 18:38:13 +0800
committereugen <eugen@FreeBSD.org>2018-07-27 18:38:13 +0800
commit052b84f3ec0ef0581f58a911fe69bdc29b0a0e07 (patch)
tree205b5c56e1c39bb4d71ac85c75ebaf44c7c7c916 /net
parentd9145ddda2f202cd28c18db8444a7aa93368a291 (diff)
downloadfreebsd-ports-gnome-052b84f3ec0ef0581f58a911fe69bdc29b0a0e07.tar.gz
freebsd-ports-gnome-052b84f3ec0ef0581f58a911fe69bdc29b0a0e07.tar.zst
freebsd-ports-gnome-052b84f3ec0ef0581f58a911fe69bdc29b0a0e07.zip
net/mpd5: add a fix from upstream r2247
Prevent reporting wrong traffic accounting data in very rare case of failure of netgraph statistical socket data flow.
Diffstat (limited to 'net')
-rw-r--r--net/mpd5/Makefile2
-rw-r--r--net/mpd5/files/patch-fixstats30
2 files changed, 31 insertions, 1 deletions
diff --git a/net/mpd5/Makefile b/net/mpd5/Makefile
index 7344402baebc..4fed5d24d79b 100644
--- a/net/mpd5/Makefile
+++ b/net/mpd5/Makefile
@@ -3,7 +3,7 @@
PORTNAME= mpd
DISTVERSION= 5.8
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= net
MASTER_SITES= SF/${PORTNAME}/Mpd5/Mpd-${PORTVERSION}
PKGNAMESUFFIX= 5
diff --git a/net/mpd5/files/patch-fixstats b/net/mpd5/files/patch-fixstats
new file mode 100644
index 000000000000..065d094f50dc
--- /dev/null
+++ b/net/mpd5/files/patch-fixstats
@@ -0,0 +1,30 @@
+Index: src/bund.c
+===================================================================
+--- src/bund.c (revision 2246)
++++ src/bund.c (revision 2247)
+@@ -1394,9 +1394,9 @@ BundUpdateStats(Bund b)
+ b->stats.runts += abs(stats.runts - b->oldStats.runts);
+ b->stats.dupFragments += abs(stats.dupFragments - b->oldStats.dupFragments);
+ b->stats.dropFragments += abs(stats.dropFragments - b->oldStats.dropFragments);
++ b->oldStats = stats;
+ }
+
+- b->oldStats = stats;
+ #else
+ NgFuncGetStats64(b, l, &b->stats);
+ #endif
+Index: src/link.c
+===================================================================
+--- src/link.c (revision 2246)
++++ src/link.c (revision 2247)
+@@ -1359,9 +1359,9 @@ LinkUpdateStats(Link l)
+ l->stats.runts += abs(stats.runts - l->oldStats.runts);
+ l->stats.dupFragments += abs(stats.dupFragments - l->oldStats.dupFragments);
+ l->stats.dropFragments += abs(stats.dropFragments - l->oldStats.dropFragments);
++ l->oldStats = stats;
+ }
+
+- l->oldStats = stats;
+ #else
+ NgFuncGetStats64(l->bund, l->bundleIndex, &l->stats);
+ #endif