From: Michael Tremer Date: Thu, 30 Oct 2025 11:40:16 +0000 (+0100) Subject: ovpnmain.cgi: Fix iterating over the DHCP CCD options X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42943bfe2daa307c82fbe124d27ccbe492ab5420;p=ipfire-2.x.git ovpnmain.cgi: Fix iterating over the DHCP CCD options Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 3b3776aaa..fa5ef295a 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -677,24 +677,24 @@ sub write_ccd_configs() { # DHCP Options my %options = ( - "DNS" => ( + "DNS" => [ $conns{$key}[35], $conns{$key}[36], - ), + ], - "WINS" => ( + "WINS" => [ $conns{$key}[37], - ), + ], ); print CONF "# DHCP Options\n"; foreach my $option (keys %options) { - foreach (@options{$option}) { - # Skip empty options - next if ($_ eq ""); + foreach my $address (@{ $options{$option} }) { + # Skip empty addresses + next if ($address eq ""); - print CONF "push \"dhcp-option $option $_\"\n"; + print CONF "push \"dhcp-option $option $address\"\n"; } }