From: Michael Tremer Date: Tue, 3 Jun 2025 10:40:38 +0000 (+0200) Subject: ovpnmain.cgi: Tell the server the subnet in the old-fashioned way X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86f32c944d39dc812c19ad0ed27f1cb728d13f2d;p=people%2Fms%2Fipfire-2.x.git ovpnmain.cgi: Tell the server the subnet in the old-fashioned way Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index a7bc0c02a..fd3e38e84 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -240,8 +240,10 @@ sub writeserverconf { print CONF "# Topology\n"; print CONF "topology subnet\n\n"; - my @tempovpnsubnet = split("\/",$vpnsettings{'DOVPN_SUBNET'}); - print CONF "server $tempovpnsubnet[0] $tempovpnsubnet[1]\n"; + my $netaddress = &Network::get_netaddress($vpnsettings{'DOVPN_SUBNET'}); + my $subnetmask = &Network::get_netmask($vpnsettings{'DOVPN_SUBNET'}); + + print CONF "server $netaddress $subnetmask\n"; print CONF "tun-mtu $vpnsettings{'DMTU'}\n"; # Write custom routes