Browse Source

bird: Only set up iBGP sessions when peer is active or staged.

  Don't set up iBGP sessions to peers being offline, planned, etc.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 4 years ago
parent
commit
0716416c54
1 changed files with 5 additions and 0 deletions
  1. 5 0
      bird/ibgp.conf

+ 5 - 0
bird/ibgp.conf

@@ -30,6 +30,11 @@ template bgp ibgp {
       {%- continue %}
     {%- endif %}
 
+    {#- Don't try to set up sessions to VMs/devices which are "offline" or "planned" etc. #}
+    {%- if peer_node_config.get ('status', '') not in [ '', 'active', 'staged' ] %}
+      {%- continue %}
+    {%- endif %}
+
     {#- Is our peer a route reflector? #}
     {%- if 'routereflector' in peer_roles %}
       {%- do peer_config.update ({'rr' : True }) %}