diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2010-02-23 04:49:21 -0700 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2010-02-23 04:54:31 -0700 |
commit | 82fccf3a96c88b751095d868c156b59dc396deaa (patch) | |
tree | 115d4791172f6c5787bd1be397289a197f00b8a4 | |
parent | 1d072761e1e1ebc906bee3fea95f073426518c2f (diff) | |
download | pfsense-82fccf3a96c88b751095d868c156b59dc396deaa.zip pfsense-82fccf3a96c88b751095d868c156b59dc396deaa.tar.gz |
Allow changing the parent interface of an unassigned wireless clone.
-rw-r--r-- | usr/local/www/interfaces_wireless_edit.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr/local/www/interfaces_wireless_edit.php b/usr/local/www/interfaces_wireless_edit.php index c0522c2..2f3a196 100644 --- a/usr/local/www/interfaces_wireless_edit.php +++ b/usr/local/www/interfaces_wireless_edit.php @@ -113,17 +113,18 @@ if ($_POST) { if (isset($id) && $a_clones[$id]) { if (clone_inuse($a_clones[$id]['if'])) { if ($clone['if'] != $a_clones[$id]['if']) - $input_errors[] = "This wireless clone cannot be modified because it is still being used as an interface."; + $input_errors[] = "This wireless clone cannot be modified because it is still assigned as an interface."; else if ($clone['mode'] != $a_clones[$id]['mode']) $input_errors[] = "Use the configuration page for the assigned interface to change the mode."; - } else if ($clone['if'] != $a_clones[$id]['if']) - $input_errors[] = "Changing the parent interface is not currently supported. Create a new clone on the new parent and delete the old clone on the previous parent."; + } } if (!$input_errors) { if (!interface_wireless_clone($clone['cloneif'], $clone)) { $input_errors[] = "Error creating interface with mode {$clone['mode']}. The {$clone['if']} interface may not support creating more clones with the selected mode."; } else { if (isset($id) && $a_clones[$id]) { + if ($clone['if'] != $a_clones[$id]['if']) + mwexec("/sbin/ifconfig " . $a_clones[$id]['cloneif'] . " destroy"); $input_errors[] = "Created with id {$id}"; $a_clones[$id] = $clone; } else { |