Ticket #752. Consider openvpn interfaces as ones with gateways now that the up/down scripts write the appropriate information.

This commit is contained in:
Ermal 2010-07-29 12:59:49 +00:00
parent 587565777b
commit 7970b622b4

View File

@ -2993,6 +2993,8 @@ function get_interfaces_with_gateway() {
/* loop interfaces, check config for outbound */
foreach($config['interfaces'] as $ifdescr => $ifname) {
if (substr($ifdescr, 0, 4) == "ovpn")
return true;
switch ($ifname['ipaddr']) {
case "dhcp":
@ -3018,6 +3020,8 @@ function interface_has_gateway($friendly) {
global $config;
if (!empty($config['interfaces'][$friendly])) {
if (substr($friendly, 0, 4) == "ovpn")
return true;
$ifname =& $config['interfaces'][$friendly];
switch ($ifname['ipaddr']) {
case "dhcp":
@ -3224,4 +3228,4 @@ function setup_pppoe_reset_file($pppif, $iface="") {
unlink_if_exists($cron_file);
}
?>
?>