From c7220d6e5a39c76c010b44a40408b6408987c9cb Mon Sep 17 00:00:00 2001 From: Dominik Hassler Date: Wed, 9 Jul 2014 23:53:37 +0200 Subject: [PATCH] - connections.cgi: static ip address pools colour --- html/cgi-bin/connections.cgi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/html/cgi-bin/connections.cgi b/html/cgi-bin/connections.cgi index c7220f62d1..f1ed2125a2 100644 --- a/html/cgi-bin/connections.cgi +++ b/html/cgi-bin/connections.cgi @@ -238,6 +238,23 @@ if (-e "${General::swroot}/ovpn/settings") { } } +# Add OpenVPN net for custom OVPNs +if (-e "${General::swroot}/ovpn/ccd.conf") { + open(OVPNSUB, "${General::swroot}/ovpn/ccd.conf"); + my @ovpnsub = ; + close(OVPNSUB); + + foreach (@ovpnsub) { + my ($network, $mask) = split '/', (split ',', $_)[2]; + + $mask = ipv4_cidr2msk($mask) unless &General::validip($mask); + + push(@network, $network); + push(@masklen, $mask); + push(@colour, ${Header::colourovpn}); + } +} + open(IPSEC, "${General::swroot}/vpn/config"); my @ipsec = ; close(IPSEC); -- 2.39.5