1 From a45710a5a887d25ab0e04ce1553bb268013ef780 Mon Sep 17 00:00:00 2001
2 From: Michael Tremer <michael.tremer@ipfire.org>
3 Date: Tue, 16 Sep 2014 14:44:42 +0200
4 Subject: [PATCH 19/22] openvpn: Ignore not fully established connections
7 src/openvpn.c | 15 +++++++++++++++
8 1 file changed, 15 insertions(+)
10 diff --git a/src/openvpn.c b/src/openvpn.c
11 index 9598abc..6a0ffbd 100644
14 @@ -292,6 +292,10 @@ static int multi1_read (char *name, FILE *fh)
18 + // Ignore not yet fully established connections
19 + if (strcmp(fields[1], "UNDEF") == 0)
22 if (collect_user_count)
23 /* If so, sum all users, ignore the individuals*/
25 @@ -347,6 +351,10 @@ static int multi2_read (char *name, FILE *fh)
26 if (strcmp (fields[0], "CLIENT_LIST") != 0)
29 + // Ignore not yet fully established connections
30 + if (strcmp(fields[0], "UNDEF") == 0)
33 if (collect_user_count)
34 /* If so, sum all users, ignore the individuals*/
36 @@ -412,6 +420,10 @@ static int multi3_read (char *name, FILE *fh)
37 if (strcmp (fields[0], "CLIENT_LIST") != 0)
40 + // Ignore not yet fully established connections
41 + if (strcmp(fields[0], "UNDEF") == 0)
44 if (collect_user_count)
45 /* If so, sum all users, ignore the individuals*/
47 @@ -475,6 +487,9 @@ static int multi4_read (char *name, FILE *fh)
48 if (strcmp (fields[0], "CLIENT_LIST") != 0)
51 + // Ignore not yet fully established connections
52 + if (strcmp(fields[0], "UNDEF") == 0)
55 if (collect_user_count)
56 /* If so, sum all users, ignore the individuals*/