From 08ab5cd2b45247ea73e022d9334c218b15c281ec Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 4 Apr 2012 13:40:49 -0400 Subject: [PATCH] Expand these checks to include 'dynamic' or they'll never match dynamic gateways, leading to issues with routing. --- etc/inc/system.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/inc/system.inc b/etc/inc/system.inc index ccc5416b36..e9f7781d17 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -353,7 +353,7 @@ function system_routing_configure($interface = "") { if (is_array($config['gateways']['gateway_item'])) { mwexec("/bin/rm {$g['tmp_path']}/*_defaultgw", true); foreach ($config['gateways']['gateway_item'] as $gateway) { - if (isset($gateway['defaultgw']) && (is_ipaddrv4($gateway['gateway']))) { + if (isset($gateway['defaultgw']) && ((is_ipaddrv4($gateway['gateway'])) || ($gateway['gateway'] == "dynamic"))) { if(strstr($gateway['gateway'], ":")) break; if ($gateway['gateway'] == "dynamic") @@ -370,7 +370,7 @@ function system_routing_configure($interface = "") { } } foreach ($config['gateways']['gateway_item'] as $gateway) { - if (isset($gateway['defaultgw']) && (is_ipaddrv6($gateway['gateway']))) { + if (isset($gateway['defaultgw']) && ((is_ipaddrv6($gateway['gateway'])) || ($gateway['gateway'] == "dynamic6"))) { if ($gateway['gateway'] == "dynamic6") $gateway['gateway'] = get_interface_gateway_v6($gateway['interface']); $gatewayipv6 = $gateway['gateway'];