We must count packets even if destination port is the same as source
port otherwise we won't have traffic (eg. UDP/123 <--> UDP/123)
counters accurate.
Signed-off-by: Vitezslav Samel <vitezslav(a)samel.cz>
---
src/serv.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/serv.c b/src/serv.c
index 6777460..7d1470a 100644
--- a/src/serv.c
+++ b/src/serv.c
@@ -395,11 +395,9 @@ static void updateportent(struct portlist *list, unsigned int
protocol,
if (dport_listent == NULL)
return;
- if (dport_listent != sport_listent) {
- dport_listent->count++;
- dport_listent->bcount += br;
- dport_listent->spans.spanbr += br;
- }
+ dport_listent->count++;
+ dport_listent->bcount += br;
+ dport_listent->spans.spanbr += br;
dport_listent->ibcount += br;
dport_listent->spans.spanbr_in += br;
--
1.7.8.4