summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-07-09 16:11:07 +0000
committerErmal Luçi <eri@pfsense.org>2008-07-09 16:11:07 +0000
commit04bff45acec4505520e832c8bafdf64ce71f0dbf (patch)
tree8cacf5a9ba5abcb47738c0f2743f10642f127949
parenta9e486854c0d4ff0c5f23193ecf6980f9955a9e8 (diff)
downloadpfsense-04bff45acec4505520e832c8bafdf64ce71f0dbf.zip
pfsense-04bff45acec4505520e832c8bafdf64ce71f0dbf.tar.gz
Correct typo and better handle recreation of vlan with specific name.
-rw-r--r--etc/inc/interfaces.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 95b8db4..fe84de1 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -73,12 +73,13 @@ function interface_vlan_configure($if, $tag, $vlanif = "") {
/* make sure the parent interface is up */
mwexec("/sbin/ifconfig " . escapeshellarg($if) . " up");
- if ($g['booting'] || !(empty($vlanif)))
+ if ($g['booting'] || !(empty($vlanif))) {
+ mwexec("/sbin/ifconfig {$vlanif} destroy");
mwexec("/sbin/ifconfig {$vlanif} create");
- else
+ } else
$vlanif = exec("/sbin/ifconfig vlan create");
- mwexec("/sbin/ifconfig {$vilanif} vlan " .
+ mwexec("/sbin/ifconfig {$vlanif} vlan " .
escapeshellarg($tag) . " vlandev " .
escapeshellarg($if));
OpenPOWER on IntegriCloud