Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,18 @@
<visible>false</visible>
</grid_view>
</field>
<field>
<id>neighbor.bfd_strict</id>
<label>BFD Strict Mode</label>
<type>checkbox</type>
<help>Strict mode requires the BFD session to be established before allowing BGP to connect. If BFD goes down, BGP immediately closes the session. This prevents BGP sessions from remaining up when the underlying link is down. Requires BFD to be enabled.</help>
<style>bfd_strict_mode</style>
<grid_view>
<type>boolean</type>
<formatter>boolean</formatter>
<visible>false</visible>
</grid_view>
</field>
<field>
<id>neighbor.keepalive</id>
<label>Keepalive</label>
Expand Down
3 changes: 2 additions & 1 deletion net/frr/src/opnsense/mvc/app/models/OPNsense/Quagga/BGP.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<model>
<mount>//OPNsense/quagga/bgp</mount>
<description>BGP Routing configuration</description>
<version>1.1.1</version>
<version>1.1.2</version>
<items>
<enabled type="BooleanField">
<Default>0</Default>
Expand Down Expand Up @@ -98,6 +98,7 @@
<rrclient type="BooleanField"/>
<soft_reconfiguration_inbound type="BooleanField"/>
<bfd type="BooleanField"/>
<bfd_strict type="BooleanField"/>
<keepalive type="IntegerField">
<MinimumValue>1</MinimumValue>
<MaximumValue>1000</MaximumValue>
Expand Down
9 changes: 9 additions & 0 deletions net/frr/src/opnsense/mvc/app/views/OPNsense/Quagga/bgp.volt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,19 @@ POSSIBILITY OF SUCH DAMAGE.

<script>
$(document).ready(function() {
$(document).on('change', '#neighbor\\.bfd', function(){
Comment thread
r3m8 marked this conversation as resolved.
if ($(this).is(':checked')) {
$(".bfd_strict_mode").closest('tr').show();
} else {
$(".bfd_strict_mode").closest('tr').hide();
}
});

mapDataToFormUI({'frm_bgp_settings':"/api/quagga/bgp/get"}).done(function(data){
formatTokenizersUI();
$('.selectpicker').selectpicker('refresh');
updateServiceControlUI('quagga');
$('#neighbor\\.bfd').trigger('change');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect you don't need this as the change event is triggered on all inputs on load anyway.

});

$("#reconfigureAct").SimpleActionButton({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ router bgp {{ OPNsense.quagga.bgp.asnumber }}
neighbor {{ neighbor.address }} local-as {{ neighbor.localas }}
{% endif %}
{% if neighbor.bfd|default('') == '1' %}
neighbor {{ neighbor.address }} bfd
neighbor {{ neighbor.address }} bfd {% if neighbor.bfd_strict|default('') == '1' %}strict{% endif %}
{% endif %}
{% if 'password' in neighbor and neighbor.password != '' %}
neighbor {{ neighbor.address }} password {{ neighbor.password }}
Expand Down