Commit 8d1809ed authored by Franco Fichtner's avatar Franco Fichtner

src: fix `Illegal string offset' warning in firewall rules

parent 30991a0b
<?php <?php
/* /*
Copyright (C) 2014-2015 Deciso B.V. Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2005 Scott Ullrich (sullrich@gmail.com) Copyright (C) 2005 Scott Ullrich (sullrich@gmail.com)
...@@ -152,20 +153,24 @@ if ($config['pptpd']['mode'] == "server") ...@@ -152,20 +153,24 @@ if ($config['pptpd']['mode'] == "server")
$iflist['pptp'] = "PPTP VPN"; $iflist['pptp'] = "PPTP VPN";
if (is_array($config['pppoes']['pppoe'])) { if (is_array($config['pppoes']['pppoe'])) {
foreach ($config['pppoes']['pppoe'] as $pppoes) foreach ($config['pppoes']['pppoe'] as $pppoes) {
if (($pppoes['mode'] == 'server') && have_ruleint_access("pppoe")) if (($pppoes['mode'] == 'server') && have_ruleint_access('pppoe')) {
$iflist['pppoe'] = "PPPoE Server"; $iflist['pppoe'] = "PPPoE Server";
}
}
} }
/* add ipsec interfaces */ /* add ipsec interfaces */
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
if(have_ruleint_access("enc0")) if (have_ruleint_access('enc0')) {
$iflist["enc0"] = "IPsec"; $iflist['enc0'] = 'IPsec';
}
}
/* add openvpn/tun interfaces */ /* add openvpn/tun interfaces */
if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) if (isset($config['openvpn']['openvpn-server']) || isset($config['openvpn']['openvpn-client'])) {
$iflist["openvpn"] = "OpenVPN"; $iflist['openvpn'] = 'OpenVPN';
}
if (!$if || !isset($iflist[$if])) { if (!$if || !isset($iflist[$if])) {
if ("any" == $if) if ("any" == $if)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment