Revision 81448ffa
Added by Jim Pingle about 12 years ago
etc/inc/system.inc | ||
---|---|---|
1595 | 1595 |
return file_get_contents("{$g['varlog_path']}/dmesg.boot"); |
1596 | 1596 |
} |
1597 | 1597 |
|
1598 |
function get_possible_listen_ips() { |
|
1598 |
function get_possible_listen_ips($include_ipv6_link_local=false) {
|
|
1599 | 1599 |
$interfaces = get_configured_interface_with_descr(); |
1600 | 1600 |
$carplist = get_configured_carp_interface_list(); |
1601 | 1601 |
$listenips = array(); |
... | ... | |
1608 | 1608 |
$tmp["name"] = $ifacename; |
1609 | 1609 |
$tmp["value"] = $iface; |
1610 | 1610 |
$listenips[] = $tmp; |
1611 |
if ($include_ipv6_link_local) { |
|
1612 |
$llip = find_interface_ipv6_ll(get_real_interface($iface)); |
|
1613 |
if (!empty($llip)) { |
|
1614 |
$tmp["name"] = "{$ifacename} IPv6 Link-Local"; |
|
1615 |
$tmp["value"] = $llip; |
|
1616 |
$listenips[] = $tmp; |
|
1617 |
} |
|
1618 |
} |
|
1611 | 1619 |
} |
1612 | 1620 |
$tmp["name"] = "Localhost"; |
1613 | 1621 |
$tmp["value"] = "lo0"; |
... | ... | |
1615 | 1623 |
return $listenips; |
1616 | 1624 |
} |
1617 | 1625 |
|
1618 |
function get_possible_traffic_source_addresses() { |
|
1626 |
function get_possible_traffic_source_addresses($include_ipv6_link_local=false) {
|
|
1619 | 1627 |
global $config; |
1620 |
$sourceips = get_possible_listen_ips(); |
|
1628 |
$sourceips = get_possible_listen_ips($include_ipv6_link_local);
|
|
1621 | 1629 |
foreach (array('server', 'client') as $mode) { |
1622 | 1630 |
if (is_array($config['openvpn']["openvpn-{$mode}"])) { |
1623 | 1631 |
foreach ($config['openvpn']["openvpn-{$mode}"] as $id => $setting) { |
usr/local/www/diag_ping.php | ||
---|---|---|
112 | 112 |
<td width="78%" class="vtable"> |
113 | 113 |
<select name="sourceip" class="formselect"> |
114 | 114 |
<option value="">Default</option> |
115 |
<?php $sourceips = get_possible_traffic_source_addresses(); |
|
115 |
<?php $sourceips = get_possible_traffic_source_addresses(true);
|
|
116 | 116 |
foreach ($sourceips as $sip): |
117 | 117 |
$selected = ""; |
118 | 118 |
if (!link_interface_to_bridge($sip['value']) && ($sip['value'] == $sourceip)) |
usr/local/www/diag_testport.php | ||
---|---|---|
144 | 144 |
<td width="78%" class="vtable"> |
145 | 145 |
<select name="sourceip" class="formselect"> |
146 | 146 |
<option value="">Any</option> |
147 |
<?php $sourceips = get_possible_traffic_source_addresses(); |
|
147 |
<?php $sourceips = get_possible_traffic_source_addresses(true);
|
|
148 | 148 |
foreach ($sourceips as $sip): |
149 | 149 |
$selected = ""; |
150 | 150 |
if (!link_interface_to_bridge($sip['value']) && ($sip['value'] == $sourceip)) |
usr/local/www/diag_traceroute.php | ||
---|---|---|
114 | 114 |
<td width="78%" class="vtable"> |
115 | 115 |
<select name="sourceip" class="formselect"> |
116 | 116 |
<option value="">Any</option> |
117 |
<?php $sourceips = get_possible_traffic_source_addresses(); |
|
117 |
<?php $sourceips = get_possible_traffic_source_addresses(true);
|
|
118 | 118 |
foreach ($sourceips as $sip): |
119 | 119 |
$selected = ""; |
120 | 120 |
if (!link_interface_to_bridge($sip['value']) && ($sip['value'] == $sourceip)) |
Also available in: Unified diff
Show IPv6 link-local IPs as specific sources for ping, traceroute, and port testing.