diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-12-06 11:39:29 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-12-06 11:39:29 -0200 |
commit | 77a341a458d604287f46180db1facbdb540cd139 (patch) | |
tree | 369ac305a311b752aa96fbc327729b75e3f2bd73 /usr/local/www/system_advanced_network.php | |
parent | 09e14acf5b7b0fcb4f0404c0474a6a268c4bf60e (diff) | |
download | pfsense-77a341a458d604287f46180db1facbdb540cd139.zip pfsense-77a341a458d604287f46180db1facbdb540cd139.tar.gz |
Add a knob to prefer IPv4 over IPv6, it fixes #2833
Diffstat (limited to 'usr/local/www/system_advanced_network.php')
-rw-r--r-- | usr/local/www/system_advanced_network.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/usr/local/www/system_advanced_network.php b/usr/local/www/system_advanced_network.php index 82b5661..28450ad 100644 --- a/usr/local/www/system_advanced_network.php +++ b/usr/local/www/system_advanced_network.php @@ -51,6 +51,7 @@ require_once("shaper.inc"); $pconfig['ipv6nat_enable'] = isset($config['diag']['ipv6nat']['enable']); $pconfig['ipv6nat_ipaddr'] = $config['diag']['ipv6nat']['ipaddr']; $pconfig['ipv6allow'] = isset($config['system']['ipv6allow']); +$pconfig['prefer_ipv4'] = isset($config['system']['prefer_ipv4']); $pconfig['polling_enable'] = isset($config['system']['polling']); $pconfig['sharednet'] = $config['system']['sharednet']; $pconfig['disablechecksumoffloading'] = isset($config['system']['disablechecksumoffloading']); @@ -88,6 +89,12 @@ if ($_POST) { unset($config['system']['ipv6allow']); } + if($_POST['prefer_ipv4'] == "yes") { + $config['system']['prefer_ipv4'] = true; + } else { + unset($config['system']['prefer_ipv4']); + } + if($_POST['sharednet'] == "yes") { $config['system']['sharednet'] = true; system_disable_arp_wrong_if(); @@ -136,6 +143,9 @@ if ($_POST) { // Configure flowtable support from filter.inc flowtable_configure(); + // Set preferred protocol + prefer_ipv4_or_ipv6(); + $retval = filter_configure(); if(stristr($retval, "error") <> true) $savemsg = get_std_save_message(gettext($retval)); @@ -228,6 +238,16 @@ function enable_change(enable_over) { </td> </tr> <tr> + <td width="22%" valign="top" class="vncell"><?=gettext("Prefer IPv4 over IPv6"); ?></td> + <td width="78%" class="vtable"> + <input name="prefer_ipv4" type="checkbox" id="prefer_ipv4" value="yes" <?php if ($pconfig['prefer_ipv4']) echo "checked=\"checked\""; ?> /> + <strong><?=gettext("Prefer to use IPv4 even if IPv6 is available"); ?></strong><br/> + <?=gettext("By default, if a hostname resolves IPv6 and IPv4 addresses ". + "IPv6 will be used, if you check this option, IPv4 will be " . + "used instead of IPv6."); ?><br /> + </td> + </tr> + <tr> <td colspan="2" class="list" height="12"> </td> </tr> <tr> |