From caabf014aa9a7d4b80b89f7d9a3d29b9d3d58243 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 25 Jun 2018 16:10:02 +0000 Subject: [PATCH] interfaces: ipv6 is in the next condition #2458 --- src/www/system_gateways_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/www/system_gateways_edit.php b/src/www/system_gateways_edit.php index 53d28f6d9..4ff351ae7 100644 --- a/src/www/system_gateways_edit.php +++ b/src/www/system_gateways_edit.php @@ -107,8 +107,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { } elseif (is_ipaddrv6($pconfig['gateway'])) { /* do not do a subnet match on a link local address, it's valid */ if (!is_linklocal($pconfig['gateway'])) { - $parent_ip = get_interface_ipv6($pconfig['interface']); - $parent_sn = get_interface_subnetv6($pconfig['interface']); + $parent_ip = empty($pconfig['ajaxip']) ? get_interface_ipv6($pconfig['interface']) : $pconfig['ajaxip']; + $parent_sn = empty($pconfig['ajaxnet']) ? get_interface_subnetv6($pconfig['interface']) : $pconfig['ajaxnet']; if (empty($parent_ip) || empty($parent_sn)) { $input_errors[] = gettext("Cannot add IPv6 Gateway Address because no IPv6 address could be found on the interface."); } else {