diff options
-rw-r--r-- | etc/inc/config.inc | 2 | ||||
-rw-r--r-- | etc/inc/interfaces.inc | 2 | ||||
-rwxr-xr-x | usr/local/www/interfaces.php | 6 | ||||
-rwxr-xr-x | usr/local/www/interfaces_wan.php | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 7d41bc5..c117079 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -580,7 +580,7 @@ function convert_config() { /* Default route moved */ if (isset($config['interfaces']['wan']['gateway'])) if ($config['interfaces']['wan']['gateway'] <> "") - $config['system']['gateway'] = $config['interfaces']['wan']['gateway']; + $config['interfaces']['wan']['gateway'] = $config['interfaces']['wan']['gateway']; unset($config['interfaces']['wan']['gateway']); /* Queues are no longer interface specific */ diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 339d870..d6433f0 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -713,7 +713,7 @@ function interfaces_wan_configure() { } /* install default route */ mwexec("/sbin/route delete default"); - mwexec("/sbin/route add default " . escapeshellarg($config['system']['gateway'])); + mwexec("/sbin/route add default " . escapeshellarg($config['interfaces']['wan']['gateway'])); /* resync pf (done automatically for DHCP/PPPoE/PPTP) */ filter_configure(); diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 2872587..7c25a47 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -71,7 +71,7 @@ if ($wancfg['ipaddr'] == "dhcp") { $pconfig['type'] = "Static"; $pconfig['ipaddr'] = $wancfg['ipaddr']; $pconfig['subnet'] = $wancfg['subnet']; - $pconfig['gateway'] = $config['system']['gateway']; + $pconfig['gateway'] = $config['interfaces']['wan']['gateway']; $pconfig['pointtopoint'] = $wancfg['pointtopoint']; } @@ -191,7 +191,7 @@ if ($_POST) { unset($wancfg['ipaddr']); unset($wancfg['subnet']); - unset($config['system']['gateway']); + unset($config['interfaces']['wan']['gateway']); unset($wancfg['pointtopoint']); unset($wancfg['dhcphostname']); unset($config['pppoe']['username']); @@ -215,7 +215,7 @@ if ($_POST) { if ($_POST['type'] == "Static") { $wancfg['ipaddr'] = $_POST['ipaddr']; $wancfg['subnet'] = $_POST['subnet']; - $config['system']['gateway'] = $_POST['gateway']; + $config['interfaces']['wan']['gateway'] = $_POST['gateway']; if (isset($wancfg['ispointtopoint'])) $wancfg['pointtopoint'] = $_POST['pointtopoint']; } else if ($_POST['type'] == "DHCP") { diff --git a/usr/local/www/interfaces_wan.php b/usr/local/www/interfaces_wan.php index 2872587..7c25a47 100755 --- a/usr/local/www/interfaces_wan.php +++ b/usr/local/www/interfaces_wan.php @@ -71,7 +71,7 @@ if ($wancfg['ipaddr'] == "dhcp") { $pconfig['type'] = "Static"; $pconfig['ipaddr'] = $wancfg['ipaddr']; $pconfig['subnet'] = $wancfg['subnet']; - $pconfig['gateway'] = $config['system']['gateway']; + $pconfig['gateway'] = $config['interfaces']['wan']['gateway']; $pconfig['pointtopoint'] = $wancfg['pointtopoint']; } @@ -191,7 +191,7 @@ if ($_POST) { unset($wancfg['ipaddr']); unset($wancfg['subnet']); - unset($config['system']['gateway']); + unset($config['interfaces']['wan']['gateway']); unset($wancfg['pointtopoint']); unset($wancfg['dhcphostname']); unset($config['pppoe']['username']); @@ -215,7 +215,7 @@ if ($_POST) { if ($_POST['type'] == "Static") { $wancfg['ipaddr'] = $_POST['ipaddr']; $wancfg['subnet'] = $_POST['subnet']; - $config['system']['gateway'] = $_POST['gateway']; + $config['interfaces']['wan']['gateway'] = $_POST['gateway']; if (isset($wancfg['ispointtopoint'])) $wancfg['pointtopoint'] = $_POST['pointtopoint']; } else if ($_POST['type'] == "DHCP") { |