mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-10 01:10:07 -04:00
net/frr: add BFD strict mode for BGP neighbors (#5315)
* net/frr: add BFD strict mode for BGP neighbors * net/frr: refactor BFD event handler and config generation
This commit is contained in:
parent
461e171604
commit
e77541ecc3
4 changed files with 23 additions and 2 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -108,6 +108,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>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,14 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(document).on('change', '#neighbor\\.bfd', function(){
|
||||
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');
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ router bgp {{ OPNsense.quagga.bgp.asnumber }}
|
|||
neighbor {{ neighbor.address }} description {{ neighbor.description }}
|
||||
{% 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 }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue