Regression #11751 ยป 211.diff
| src/etc/inc/filter.inc | ||
|---|---|---|
|
function filter_rules_generate() {
|
||
|
global $config, $g, $FilterIflist, $time_based_rules, $GatewaysList,
|
||
|
$tracker, $vlanprio_values, $antilockout_tracker,
|
||
|
$bogons_tracker, $rfc1918_tracker;
|
||
|
$bogons_tracker, $rfc1918_tracker, $vpn_and_ppp_ifs;
|
||
|
$fix_rule_label = 'fix_rule_label';
|
||
|
$increment_tracker = 'filter_rule_tracker';
|
||
| ... | ... | |
|
$rule_arr1 = array();
|
||
|
$rule_arr2 = array();
|
||
|
$rule_arr3 = array();
|
||
|
$vpn_and_ppp_ifs = array("l2tp", "pptp", "pppoe", "enc0", "openvpn");
|
||
|
/*
|
||
|
* NB: The order must be: Floating rules, then interface group and then regular ones.
|
||
|
*/
|
||
| src/etc/inc/globals.inc | ||
|---|---|---|
|
),
|
||
|
);
|
||
|
global $vpn_and_ppp_ifs;
|
||
|
$vpn_and_ppp_ifs = array("l2tp", "pppoe", "enc0", "openvpn");
|
||
|
?>
|
||
| src/etc/inc/util.inc | ||
|---|---|---|
|
return false;
|
||
|
}
|
||
|
}
|
||
|
function is_interface_ipaddr($interface) {
|
||
|
global $config;
|
||
|
if (is_array($config['interfaces'][$interface]) &&
|
||
|
isset($config['interfaces'][$interface]['ipaddr']) &&
|
||
|
!empty($config['interfaces'][$interface]['ipaddr'])) {
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
function is_interface_ipaddrv6($interface) {
|
||
|
global $config;
|
||
|
if (is_array($config['interfaces'][$interface]) &&
|
||
|
isset($config['interfaces'][$interface]['ipaddrv6']) &&
|
||
|
!empty($config['interfaces'][$interface]['ipaddrv6'])) {
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
?>
|
||
| src/usr/local/www/firewall_nat_1to1_edit.php | ||
|---|---|---|
|
$srcipaddrtype = false;
|
||
|
$dstipaddrtype = false;
|
||
|
if ((($_POST['ipprotocol'] == 'inet') && !get_interface_ip($_POST['interface'])) ||
|
||
|
(($_POST['ipprotocol'] == 'inet6') && !get_interface_ipv6($_POST['interface']))) {
|
||
|
$input_errors[] = gettext("The interface do not have address from the specified address family.");
|
||
|
if (((($_POST['ipprotocol'] == 'inet') && !is_interface_ipaddr($_POST['interface'])) ||
|
||
|
(($_POST['ipprotocol'] == 'inet6') && !is_interface_ipaddrv6($_POST['interface']))) &&
|
||
|
!is_interface_group($_POST['interface']) && !in_array($_POST['interface'], $vpn_and_ppp_ifs)) {
|
||
|
$input_errors[] = gettext("The interface does not have an address from the specified address family.");
|
||
|
}
|
||
|
if ($_POST['external'] && !is_specialnet($_POST['exttype']) &&
|
||