From 2da35e87726fccef20fea365547fd757544fd27f Mon Sep 17 00:00:00 2001 From: Tomy Guichard Date: Wed, 5 Apr 2023 19:23:43 +0200 Subject: [PATCH] reverse counters swap logic --- internal/poller/interface_homelan.go | 2 +- internal/poller/interface_netdev.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/poller/interface_homelan.go b/internal/poller/interface_homelan.go index 666fdc6..02e882b 100644 --- a/internal/poller/interface_homelan.go +++ b/internal/poller/interface_homelan.go @@ -87,7 +87,7 @@ func (im *InterfaceHomeLanMbits) Poll(ctx context.Context) error { Rx: stats.Status.BytesReceived, } - if itf.IsWAN() { + if !itf.IsWAN() { counters.Swap() } diff --git a/internal/poller/interface_netdev.go b/internal/poller/interface_netdev.go index 2dec0a5..306e91f 100644 --- a/internal/poller/interface_netdev.go +++ b/internal/poller/interface_netdev.go @@ -76,7 +76,7 @@ func (im *InterfaceNetDevMbits) Poll(ctx context.Context) error { Rx: stats.Status.RxBytes, } - if itf.IsWAN() { + if !itf.IsWAN() { counters.Swap() }