summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/interfaces_gre.php
diff options
context:
space:
mode:
authorLuiz Otavio O Souza <luiz@netgate.com>2016-02-08 19:22:40 -0600
committerLuiz Otavio O Souza <luiz@netgate.com>2016-02-09 15:58:43 -0600
commit2a5960b07bb2a40aeaf81423b0c52d5629e87e49 (patch)
tree9fcb0bdd705cd77b0e570ec84a4ead17259659ac /src/usr/local/www/interfaces_gre.php
parentfd4dbabc09ddd265f78db8140bdac688651f3575 (diff)
downloadpfsense-2a5960b07bb2a40aeaf81423b0c52d5629e87e49.zip
pfsense-2a5960b07bb2a40aeaf81423b0c52d5629e87e49.tar.gz
Review of CARP uniqid changes.
It turns out that current CARP implementation is not much different from an IP alias. This commit converts the IP alias to also use the CARP uniqid scheme, this simplify the code in all other places because now we have only two different cases to deal with: - A friendly interface name (lan, wan, opt1, etc.); - A Virtual IP - VIP alias (_vip{$uniqid}) - CARP or IP Alias. The parent of a CARP is always a friendly interface. The parent of an IP alias can be a friendly interface or a CARP (this is the only case of recursion of a VIP). This commit removes a few cases where CARP were still considered a interface (the old CARP implementation), fixes all the wrong cases of strpos() being used to detect a VIP address (wont work as it returns '0' which fails when tested as 'TRUE'), review the usage of CARP and IP alias as services bind addresses, fixes general issues of adding and editing VIP addresses. The following subsystems were affected by this changes: - IPSEC; - OpenVPN; - dnsmasq; - NTP; - gateways and gateway groups; - IPv6 RA; - GRE interfaces; - CARP status; - Referrer authentication. Fixes (and/or revisit) the following tickets: - Ticket #3257 - Ticket #3716 - Ticket #4450 - Ticket #4858 - Ticket #5441 - Ticket #5442 - Ticket #5500 - Ticket #5783 - Ticket #5844
Diffstat (limited to 'src/usr/local/www/interfaces_gre.php')
-rw-r--r--src/usr/local/www/interfaces_gre.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/usr/local/www/interfaces_gre.php b/src/usr/local/www/interfaces_gre.php
index 76da5dc..0acbf1e 100644
--- a/src/usr/local/www/interfaces_gre.php
+++ b/src/usr/local/www/interfaces_gre.php
@@ -135,10 +135,15 @@ display_top_tabs($tab_array);
</tr>
</thead>
<tbody>
-<?php foreach ($a_gres as $i => $gre): ?>
+<?php foreach ($a_gres as $i => $gre):
+ if (substr($gre['if'], 0, 4) == "_vip")
+ $if = convert_real_interface_to_friendly_descr(get_real_interface($gre['if']));
+ else
+ $if = $gre['if'];
+?>
<tr>
<td>
- <?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($gre['if']))?>
+ <?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($if))?>
</td>
<td>
<?=htmlspecialchars($gre['remote-addr'])?>
OpenPOWER on IntegriCloud