diff options
author | jim-p <jimp@pfsense.org> | 2013-04-26 13:07:47 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-04-26 13:10:12 -0400 |
commit | 81448ffa946974eb11aeabf31b23b674ab55954f (patch) | |
tree | 398223794d6f600195ea44a78ec33677d9cd1bd9 /etc/inc/system.inc | |
parent | 58897b8cc200def6192345a3fe3058fb7ebc9cb5 (diff) | |
download | pfsense-81448ffa946974eb11aeabf31b23b674ab55954f.zip pfsense-81448ffa946974eb11aeabf31b23b674ab55954f.tar.gz |
Show IPv6 link-local IPs as specific sources for ping, traceroute, and port testing.
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r-- | etc/inc/system.inc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 58793eb..f1cb84c 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -1595,7 +1595,7 @@ function system_get_dmesg_boot() { return file_get_contents("{$g['varlog_path']}/dmesg.boot"); } -function get_possible_listen_ips() { +function get_possible_listen_ips($include_ipv6_link_local=false) { $interfaces = get_configured_interface_with_descr(); $carplist = get_configured_carp_interface_list(); $listenips = array(); @@ -1608,6 +1608,14 @@ function get_possible_listen_ips() { $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"; @@ -1615,9 +1623,9 @@ function get_possible_listen_ips() { return $listenips; } -function get_possible_traffic_source_addresses() { +function get_possible_traffic_source_addresses($include_ipv6_link_local=false) { global $config; - $sourceips = get_possible_listen_ips(); + $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) { |