]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/collectd/0019-openvpn-Ignore-not-fully-established-connections.patch
gcc: Fix building with glibc >= 2.28
[people/pmueller/ipfire-2.x.git] / src / patches / collectd / 0019-openvpn-Ignore-not-fully-established-connections.patch
CommitLineData
2056dd30
AM
1From a45710a5a887d25ab0e04ce1553bb268013ef780 Mon Sep 17 00:00:00 2001
2From: Michael Tremer <michael.tremer@ipfire.org>
3Date: Tue, 16 Sep 2014 14:44:42 +0200
4Subject: [PATCH 19/22] openvpn: Ignore not fully established connections
5
6---
7 src/openvpn.c | 15 +++++++++++++++
8 1 file changed, 15 insertions(+)
9
10diff --git a/src/openvpn.c b/src/openvpn.c
11index 9598abc..6a0ffbd 100644
12--- a/src/openvpn.c
13+++ b/src/openvpn.c
14@@ -292,6 +292,10 @@ static int multi1_read (char *name, FILE *fh)
15 if (fields_num < 4)
16 continue;
17
18+ // Ignore not yet fully established connections
19+ if (strcmp(fields[1], "UNDEF") == 0)
20+ continue;
21+
22 if (collect_user_count)
23 /* If so, sum all users, ignore the individuals*/
24 {
25@@ -347,6 +351,10 @@ static int multi2_read (char *name, FILE *fh)
26 if (strcmp (fields[0], "CLIENT_LIST") != 0)
27 continue;
28
29+ // Ignore not yet fully established connections
30+ if (strcmp(fields[0], "UNDEF") == 0)
31+ continue;
32+
33 if (collect_user_count)
34 /* If so, sum all users, ignore the individuals*/
35 {
36@@ -412,6 +420,10 @@ static int multi3_read (char *name, FILE *fh)
37 if (strcmp (fields[0], "CLIENT_LIST") != 0)
38 continue;
39
40+ // Ignore not yet fully established connections
41+ if (strcmp(fields[0], "UNDEF") == 0)
42+ continue;
43+
44 if (collect_user_count)
45 /* If so, sum all users, ignore the individuals*/
46 {
47@@ -475,6 +487,9 @@ static int multi4_read (char *name, FILE *fh)
48 if (strcmp (fields[0], "CLIENT_LIST") != 0)
49 continue;
50
51+ // Ignore not yet fully established connections
52+ if (strcmp(fields[0], "UNDEF") == 0)
53+ continue;
54
55 if (collect_user_count)
56 /* If so, sum all users, ignore the individuals*/
57--
581.9.3
59