Browse Source

Only take in consideration limit upper than 50

McKay1717 6 years ago
parent
commit
c16dcfb1b2
2 changed files with 4 additions and 0 deletions
  1. 2 0
      templates/bird_v4.j2
  2. 2 0
      templates/bird_v6.j2

+ 2 - 0
templates/bird_v4.j2

@@ -2,6 +2,8 @@ protocol bgp {{ ix_name }}_{{ neighbor_as }}{%- if session_num > 1 %}_{{ session
     neighbor {{ neighbor_ipv4 }} as {{ neighbor_as }};
     description "{{ ix_name }} / {{ description }}";
     {%- if limit_ipv4 %}
+        {% if limit_ipv4 > 50 %}
     import limit {{ limit_ipv4 }};
+        {%- endif %}
     {%- endif %}
 }

+ 2 - 0
templates/bird_v6.j2

@@ -2,6 +2,8 @@ protocol bgp {{ ix_name }}_{{ neighbor_as }}{%- if session_num > 1 %}_{{ session
     neighbor {{ neighbor_ipv6 }} as {{ neighbor_as }};
     description "{{ ix_name }} / {{ description }}";
     {%- if limit_ipv6 %}
+        {% if limit_ipv6 > 50 %}
     import limit {{ limit_ipv6 }};
+        {%- endif %}
     {%- endif %}
 }