summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorlgcosta <lgcosta@pfsense.org>2011-03-21 17:01:00 -0300
committerlgcosta <lgcosta@pfsense.org>2011-03-21 17:01:00 -0300
commit71edee5e5780231dba9f2ec9290b0dff37d4be2f (patch)
treedb82bdeed6bdf7a6b4080b366b555efb1ebd16a5 /usr
parentbf87b4d7d1e9c0064e59727afd7601c111f6f3da (diff)
downloadpfsense-71edee5e5780231dba9f2ec9290b0dff37d4be2f.zip
pfsense-71edee5e5780231dba9f2ec9290b0dff37d4be2f.tar.gz
Select the device mode to tun if variable device_mode not exist in the configuration
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/vpn_openvpn_server.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php
index f15a9ae..ef82716 100644
--- a/usr/local/www/vpn_openvpn_server.php
+++ b/usr/local/www/vpn_openvpn_server.php
@@ -671,9 +671,14 @@ if ($savemsg)
<select name="device_mode" class="formselect">
<?php
foreach ($openvpn_dev_mode as $device):
- $selected = "";
- if ($pconfig['device_mode'] == $device)
- $selected = "selected";
+ $selected = "";
+ if (! empty($pconfig['device_mode'])) {
+ if ($pconfig['device_mode'] == $device)
+ $selected = "selected";
+ } else {
+ if ($device == "tun")
+ $selected = "selected";
+ }
?>
<option value="<?=$device;?>" <?=$selected;?>><?=$device;?></option>
<?php endforeach; ?>
OpenPOWER on IntegriCloud