Skip to content

fix(ns.dashboard): add bytes sent/received check for ovpn connected client tunnels counter#1689

Merged
Tbaile merged 1 commit into
nethsecurity-8.8from
fix_ovpn_client_tunnels_dashboard_counter
May 26, 2026
Merged

fix(ns.dashboard): add bytes sent/received check for ovpn connected client tunnels counter#1689
Tbaile merged 1 commit into
nethsecurity-8.8from
fix_ovpn_client_tunnels_dashboard_counter

Conversation

@m-dilorenzi
Copy link
Copy Markdown
Collaborator

This PR contains a patch for the OpenVPN connected-client count shown on the firewall dashboard.
Previously, the dashboard API only checked whether a socket existed in the /var/run directory for a specific client tunnel.
If a client tunnel connected and was later disconnected, the socket could still remain in that directory, causing the dashboard to count that client as still connected.

This patch adds a check for the bytes_received and bytes_sent properties on the socket. If the client is disconnected, both values are 0.

This is the same mechanism already used in the OpenVPN Tunnel section to determine whether a tunnel is connected.

Closes: #1688

@m-dilorenzi m-dilorenzi requested a review from Tbaile May 22, 2026 10:00
@m-dilorenzi m-dilorenzi self-assigned this May 22, 2026
Copy link
Copy Markdown
Collaborator

@Tbaile Tbaile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷

@Tbaile Tbaile merged commit 72d6835 into nethsecurity-8.8 May 26, 2026
2 checks passed
@Tbaile Tbaile deleted the fix_ovpn_client_tunnels_dashboard_counter branch May 26, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Openvpn dashboard counter: disconnected client tunnels are counted as connected

2 participants