Skip to content

Commit f5c3860

Browse files
author
Marcin Matlag
committed
Fixes bug 5362, use local initiator IP for BGP neighbor as update-source value
* Added validation - options are mutually exclusive * FRR does not complain if given address is not on the host at the moment
1 parent 2a90eff commit f5c3860

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

net/frr/src/opnsense/mvc/app/controllers/OPNsense/Quagga/forms/dialogEditBGPNeighbor.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<label>Local Initiater IP</label>
7171
<type>text</type>
7272
<advanced>true</advanced>
73-
<help>Specify the local IP address (IPv4 or IPv6) used as the source to initiate BGP/BFD sessions and connections with the neighbor, including MD5 authentication. Takes precedence over Update-Source Interface when set.</help>
73+
<help>Specify the local IP address (IPv4 or IPv6) used as the source to initiate BGP/BFD sessions, including MD5 authentication. Mutually exclusive with Update-Source Interface.</help>
7474
<grid_view>
7575
<visible>false</visible>
7676
</grid_view>
@@ -79,7 +79,7 @@
7979
<id>neighbor.updatesource</id>
8080
<label>Update-Source Interface</label>
8181
<type>dropdown</type>
82-
<help>Interface (IPv4) where BGP sessions are sourced from, typically required when using loopback addresses.</help>
82+
<help>Interface (IPv4) where BGP sessions are sourced from, typically required when using loopback addresses. Mutually exclusive with Local Initiator IP.</help>
8383
<grid_view>
8484
<visible>false</visible>
8585
</grid_view>

net/frr/src/opnsense/mvc/app/views/OPNsense/Quagga/bgp.volt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,6 @@ POSSIBILITY OF SUCH DAMAGE.
3838
}
3939
});
4040

41-
function checkNeighborSourceConflict() {
42-
const $block = $('#help_block_neighbor\\.updatesource');
43-
if ($('#neighbor\\.updatesource').val() && $('#neighbor\\.localip').val()) {
44-
$block.text('{{ lang._("Update-Source Interface and Local Initiator IP are mutually exclusive.") }}');
45-
} else {
46-
$block.text('');
47-
}
48-
}
49-
$(document).on('change', '#neighbor\\.updatesource, #neighbor\\.localip', checkNeighborSourceConflict);
50-
5141
mapDataToFormUI({'frm_bgp_settings':"/api/quagga/bgp/get"}).done(function(data){
5242
formatTokenizersUI();
5343
$('.selectpicker').selectpicker('refresh');

0 commit comments

Comments
 (0)