[4/7] ovpnmain.cgi: Display only IP for Real Address in Connection Statistics Page

Message ID 20260411114532.43348-4-adolf.belka@ipfire.org
State Staged
Commit 94844ad71a7c25b056b0e1ac262247fcff86a35a
Headers
Series [1/7] openvpn: Update to version 2.7.1 |

Commit Message

Adolf Belka 11 Apr 2026, 11:45 a.m. UTC
- In the Connection Statistics page under Real Address it was showing the IP:Port instead
   of just the IP.
- The IP was being split out in $address but this variable was not then used to display
   the Real Address.
- This patch fixes that so that only the IP is shown for the Real Address.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 html/cgi-bin/ovpnmain.cgi | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
index b435d9e1b..b0d950cbb 100644
--- a/html/cgi-bin/ovpnmain.cgi
+++ b/html/cgi-bin/ovpnmain.cgi
@@ -3192,6 +3192,7 @@  END
 			$users[$uid]{'Since'} = $match[5];
 
 			my $address = (split ':', $users[$uid]{'RealAddress'})[0];
+			$users[$uid]{'RealAddress'} = $address;
 			$users[$uid]{'Country'} = &Location::Functions::lookup_country_code($address);
 			$uid++;