diff options
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r-- | etc/inc/system.inc | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index ba24c88..d40faa6 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -2060,49 +2060,4 @@ function system_get_dmesg_boot() { return file_get_contents("{$g['varlog_path']}/dmesg.boot"); } -function get_possible_listen_ips($include_ipv6_link_local=false) { - $interfaces = get_configured_interface_with_descr(); - $carplist = get_configured_carp_interface_list(); - $listenips = array(); - foreach ($carplist as $cif => $carpip) - $interfaces[$cif] = $carpip." (".get_vip_descr($carpip).")"; - $aliaslist = get_configured_ip_aliases_list(); - foreach ($aliaslist as $aliasip => $aliasif) - $interfaces[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")"; - foreach ($interfaces as $iface => $ifacename) { - $tmp["name"] = $ifacename; - $tmp["value"] = $iface; - $listenips[] = $tmp; - if ($include_ipv6_link_local) { - $llip = find_interface_ipv6_ll(get_real_interface($iface)); - if (!empty($llip)) { - $tmp["name"] = "{$ifacename} IPv6 Link-Local"; - $tmp["value"] = $llip; - $listenips[] = $tmp; - } - } - } - $tmp["name"] = "Localhost"; - $tmp["value"] = "lo0"; - $listenips[] = $tmp; - return $listenips; -} - -function get_possible_traffic_source_addresses($include_ipv6_link_local=false) { - global $config; - $sourceips = get_possible_listen_ips($include_ipv6_link_local); - foreach (array('server', 'client') as $mode) { - if (is_array($config['openvpn']["openvpn-{$mode}"])) { - foreach ($config['openvpn']["openvpn-{$mode}"] as $id => $setting) { - if (!isset($setting['disable'])) { - $vpn = array(); - $vpn['value'] = 'ovpn' . substr($mode, 0, 1) . $setting['vpnid']; - $vpn['name'] = gettext("OpenVPN") . " ".$mode.": ".htmlspecialchars($setting['description']); - $sourceips[] = $vpn; - } - } - } - } - return $sourceips; -} ?> |