From 8ca8def5ac9135606e43a168994c60a34ddb4ded Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 13 Dec 2018 09:08:53 +0100 Subject: [PATCH] firewall: localhost is actually loopback, loosely refs #3041 --- src/www/firewall_virtual_ip.php | 2 +- src/www/firewall_virtual_ip_edit.php | 66 ++++++++++++++-------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/www/firewall_virtual_ip.php b/src/www/firewall_virtual_ip.php index 9413e35be..6e937c4bd 100644 --- a/src/www/firewall_virtual_ip.php +++ b/src/www/firewall_virtual_ip.php @@ -265,7 +265,7 @@ $main_buttons = array( false)); - $interfaces['lo0'] = array('descr' => 'Localhost'); + $interfaces['lo0'] = array('descr' => 'Loopback'); $i = 0; foreach ($a_vip as $vipent): if(!empty($vipent['subnet']) || !empty($vipent['range']) || !empty($vipent['subnet_bits']) || (isset($vipent['range']['from']) && !empty($vipent['range']['from']))): ?> diff --git a/src/www/firewall_virtual_ip_edit.php b/src/www/firewall_virtual_ip_edit.php index 0e3db14b0..52b5ab8dd 100644 --- a/src/www/firewall_virtual_ip_edit.php +++ b/src/www/firewall_virtual_ip_edit.php @@ -1,33 +1,33 @@ - Copyright (C) 2003-2005 Manuel Kasper - Copyright (C) 2004-2005 Scott Ullrich - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ + * Copyright (C) 2014-2015 Deciso B.V. + * Copyright (C) 2005 Bill Marquette + * Copyright (C) 2003-2005 Manuel Kasper + * Copyright (C) 2004-2005 Scott Ullrich + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ require_once("guiconfig.inc"); require_once("interfaces.inc"); @@ -142,11 +142,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { if (empty($pconfig['vhid'])) { $input_errors[] = gettext('A VHID must be selected for this CARP VIP.'); } - if ($pconfig['interface'] == "lo0") { - $input_errors[] = gettext("For this type of vip localhost is not allowed."); + if ($pconfig['interface'] == 'lo0') { + $input_errors[] = gettext('For this type of VIP loopback is not allowed.'); } - } else if ($pconfig['mode'] != 'ipalias' && $pconfig['interface'] == "lo0") { - $input_errors[] = gettext("For this type of vip localhost is not allowed."); + } else if ($pconfig['mode'] != 'ipalias' && $pconfig['interface'] == 'lo0') { + $input_errors[] = gettext('For this type of VIP loopback is not allowed.'); } elseif ($pconfig['mode'] == 'ipalias' && !empty($pconfig['vhid'])) { $carpvip_found = false; foreach($config['virtualip']['vip'] as $vipId => $vip) { @@ -334,9 +334,9 @@ $( document ).ready(function() {