Revision 144fbff2
Added by Jim Pingle about 14 years ago
usr/local/www/interfaces_assign.php | ||
---|---|---|
143 | 143 |
} |
144 | 144 |
} |
145 | 145 |
|
146 |
$ovpn_descrs = array(); |
|
147 |
if (is_array($config['openvpn'])) { |
|
148 |
if (is_array($config['openvpn']['openvpn-server'])) |
|
149 |
foreach ($config['openvpn']['openvpn-server'] as $s) |
|
150 |
$ovpn_descrs[$s['vpnid']] = $s['description']; |
|
151 |
if (is_array($config['openvpn']['openvpn-client'])) |
|
152 |
foreach ($config['openvpn']['openvpn-client'] as $c) |
|
153 |
$ovpn_descrs[$c['vpnid']] = $c['description']; |
|
154 |
} |
|
155 |
|
|
146 | 156 |
if ($_POST['apply']) { |
147 | 157 |
if (file_exists("/var/run/interface_mismatch_reboot_needed")) |
148 | 158 |
system_reboot(); |
... | ... | |
452 | 462 |
echo htmlspecialchars($descr); |
453 | 463 |
} elseif ($portinfo['isqinq']) { |
454 | 464 |
echo htmlspecialchars($portinfo['descr']); |
465 |
} elseif (substr($portname, 0, 4) == 'ovpn') { |
|
466 |
echo htmlspecialchars($portname . " (" . $ovpn_descrs[substr($portname, 5, 1)] . ")"); |
|
455 | 467 |
} else |
456 | 468 |
echo htmlspecialchars($portname . " (" . $portinfo['mac'] . ")"); |
457 | 469 |
?></option> |
Also available in: Unified diff
Show the OpenVPN instance description when listing interfaces to assign in the gui.