summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-03-31 22:53:41 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-03-31 22:53:41 +0000
commit15ee447bab0d4a463646fbbb834dcbb79c57fd1f (patch)
tree5499a672eead7b86d0e0cf021a7d3f86f75bca19 /etc/inc/interfaces.inc
parent2da8d4edfaf39dfa398228efcb0436054107ed5e (diff)
downloadpfsense-15ee447bab0d4a463646fbbb834dcbb79c57fd1f.zip
pfsense-15ee447bab0d4a463646fbbb834dcbb79c57fd1f.tar.gz
Set /tmp/$interface_router even for non DHCP items.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 18a4b88..0b7c6d7 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -273,7 +273,13 @@ function interfaces_optional_configure_if($opti) {
print "\tOPT{$opti}{$optdescr}... ";
}
+ if(file_exists("/tmp/{$optcfg['if']}_router"))
+ unlink("/tmp/{$optcfg['if']}_router");
+
if (isset($optcfg['enable'])) {
+ if($optcfg['gateway'])
+ system("echo " . $optcfg['gateway'] . " > /tmp/" . $optcfg['if'] . "_router");
+
/* wireless configuration? */
if (is_array($optcfg['wireless']))
interfaces_wireless_configure($optcfg['if'], $optcfg['wireless']);
@@ -806,6 +812,9 @@ function interfaces_wan_configure() {
$wancfg = $config['interfaces']['wan'];
+ if(file_exists("/tmp/{$config['interfaces']['wan']['if']}_router"))
+ unlink("/tmp/{$config['interfaces']['wan']['if']}_router");
+
if(!$g['booting']) {
mute_kernel_msgs();
@@ -908,6 +917,9 @@ function interfaces_wan_configure() {
if($dont_add_route == false)
mwexec("/sbin/route add default " . escapeshellarg($config['interfaces']['wan']['gateway']));
+ if($config['interfaces']['wan']['gateway'])
+ system("echo " . $config['interfaces']['wan']['gateway'] . " > /tmp/" . $config['interfaces']['wan']['if'] . "_router");
+
/* resync pf (done automatically for DHCP/PPPoE/PPTP) */
filter_configure();
}
OpenPOWER on IntegriCloud