diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-03-12 11:37:31 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-03-12 11:37:31 -0300 |
commit | a1f735b31c8f7f0cca0ebc5a7153cd06cdf4482e (patch) | |
tree | 4fcb8a1ed240ce4e3c2460ab7fe7af1eb1297ee6 /usr/local | |
parent | 4f537e9396fe427e350e57f7290bde26ca2dcbac (diff) | |
download | pfsense-a1f735b31c8f7f0cca0ebc5a7153cd06cdf4482e.zip pfsense-a1f735b31c8f7f0cca0ebc5a7153cd06cdf4482e.tar.gz |
Do not route do default gw when rule gw is down
- Add a new advanced misc option to change the behaviour
- When it is set and rule has its own gateway, that is down, just
disable the rule instead of routing it to default gw
Fixes #2858
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/www/system_advanced_misc.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/usr/local/www/system_advanced_misc.php b/usr/local/www/system_advanced_misc.php index 10de5f3..92b4069 100644 --- a/usr/local/www/system_advanced_misc.php +++ b/usr/local/www/system_advanced_misc.php @@ -68,6 +68,7 @@ $pconfig['crypto_hardware'] = $config['system']['crypto_hardware']; $pconfig['thermal_hardware'] = $config['system']['thermal_hardware']; $pconfig['schedule_states'] = isset($config['system']['schedule_states']); $pconfig['kill_states'] = isset($config['system']['kill_states']); +$pconfig['skip_rules_gw_down'] = isset($config['system']['skip_rules_gw_down']); $pconfig['use_mfs_tmpvar'] = isset($config['system']['use_mfs_tmpvar']); $pconfig['use_mfs_tmp_size'] = $config['system']['use_mfs_tmp_size']; $pconfig['use_mfs_var_size'] = $config['system']['use_mfs_var_size']; @@ -207,6 +208,11 @@ if ($_POST) { else unset($config['system']['kill_states']); + if($_POST['skip_rules_gw_down'] == "yes") + $config['system']['skip_rules_gw_down'] = true; + else + unset($config['system']['skip_rules_gw_down']); + if($_POST['use_mfs_tmpvar'] == "yes") $config['system']['use_mfs_tmpvar'] = true; else @@ -549,6 +555,16 @@ function tmpvar_checked(obj) { </td> </tr> <tr> + <td width="22%" valign="top" class="vncell"><?=gettext("Skip rules when gateway is down"); ?></td> + <td width="78%" class="vtable"> + <input name="skip_rules_gw_down" type="checkbox" id="skip_rules_gw_down" value="yes" <?php if ($pconfig['skip_rules_gw_down']) echo "checked=\"checked\""; ?> /> + <br /> + <?=gettext("By default, when a rule has a specific gateway set, and this gateway is down, ". + "rule is created and traffic is sent to default gateway.This option overrides that behavior ". + "and the rule is not created when gateway is down"); ?> + </td> + </tr> + <tr> <td colspan="2" valign="top" class="listtopic"><?=gettext("RAM Disks"); ?></td> </tr> <?php if ($g['platform'] == "pfSense"): ?> |