1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00
freebsd-ports/net/mpd5/files/patch-fixstats
Eugene Grosbein da6bb7f856 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.
2018-07-27 10:38:13 +00:00

31 lines
1.1 KiB
Plaintext

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