gateway error messages - standardise text and clarify "both"

This commit is contained in:
stilez 2016-09-10 08:11:10 +01:00 committed by GitHub
parent cff60fef4f
commit b9004e46d6

View File

@ -311,20 +311,20 @@ if ($_POST) {
continue;
}
if (($_POST['ipprotocol'] == "inet46") && ($_POST['ipprotocol'] != $family)) {
$input_errors[] = gettext("A gateway can not be assigned to a rule that applies to IPv4 and IPv6");
$input_errors[] = gettext("A gateway can not be assigned to a rule that applies to both IPv4 and IPv6");
}
if (($_POST['ipprotocol'] == "inet6") && ($_POST['ipprotocol'] != $family)) {
$input_errors[] = gettext("An IPv4 gateway group can not be assigned on an IPv6 Address Family rule");
$input_errors[] = gettext("An IPv4 gateway group can not be assigned to an IPv6 Filter rule");
}
if (($_POST['ipprotocol'] == "inet") && ($_POST['ipprotocol'] != $family)) {
$input_errors[] = gettext("An IPv6 gateway group can not be assigned on an IPv4 Address Family rule");
$input_errors[] = gettext("An IPv6 gateway group can not be assigned to an IPv4 Filter rule");
}
}
}
}
if (is_ipaddr(lookup_gateway_ip_by_name($_POST['gateway']))) {
if (($_POST['ipprotocol'] == "inet46") && ($_POST['gateway'] <> "")) {
$input_errors[] = gettext("A gateway can not be assigned to a rule that applies to IPv4 and IPv6");
$input_errors[] = gettext("A gateway can not be assigned to a rule that applies to both IPv4 and IPv6");
}
if (($_POST['ipprotocol'] == "inet6") && (!is_ipaddrv6(lookup_gateway_ip_by_name($_POST['gateway'])))) {
$input_errors[] = gettext("An IPv4 Gateway can not be assigned to an IPv6 Filter rule");