1. 30 Apr, 2019 1 commit
    • Ondřej Zajíček's avatar
      BGP: Dynamic BGP · e0835db4
      Ondřej Zajíček authored
      Support for dynamically spawning BGP protocols for incoming connections.
      Use 'neighbor range' to specify range of valid neighbor addresses, then
      incoming connections from these addresses spawn new BGP instances.
      e0835db4
  2. 14 Mar, 2019 1 commit
    • Ondřej Zajíček's avatar
      Nest: Update handling of temporary attributes · 875cc073
      Ondřej Zajíček authored
      The temporary atttributes are no longer removed by ea_do_prune(), but
      they are undefined by store_tmp_attrs() protocol hooks. This fixes
      several bugs where temporary attributes were removed when they should
      not or not removed when they should be. The flag EAF_TEMP is no longer
      needed and was removed.
      
      Update all protocol make_tmp_attrs() / store_tmp_attrs() hooks to use
      helper functions and to handle unset attributes properly.
      
      Also fix some related bugs like improper handling of empty eattr list.
      875cc073
  3. 06 Mar, 2019 1 commit
    • Ondřej Zajíček's avatar
      OSPF: Improved handling of tmpattrs · 9aa77fcc
      Ondřej Zajíček authored
      Keep track of whether OSPF tmpattrs are actually defined for given route
      (using flags in rte->pflags). That makes them behave more like real
      eattrs so a protocol can define just a subset of them or they can be
      undefined by filters.
      
      Do not set ospf_metric2 for other than type 2 external OSPF routes and do
      not set ospf_tag for non-external OSPF routes. That also fixes a bug
      where internal/inter-area route propagated from one OSPF instance to
      another is initiated with infinity ospf_metric2.
      
      Thanks to Yaroslav Dronskii for the bugreport.
      9aa77fcc
  4. 22 Feb, 2019 1 commit
    • Ondřej Zajíček's avatar
      Nest: Do not compare rte.flags during rte_update() · 93af78d2
      Ondřej Zajíček authored
      Route flags are mosty internal state of rtable, they are not significant
      to whether a route has changed. With the old code, all routes received as
      a part of enhanced route refresh are always re-announced to other peers
      due to change in REF_STALE.
      93af78d2
  5. 19 Feb, 2019 1 commit
  6. 05 Feb, 2019 2 commits
    • Ondřej Zajíček's avatar
      Nest: Improve export counter handling · 6e8fb668
      Ondřej Zajíček authored
      One of previous workarounds for phantom route avoidance breaks export
      counters by expanding sending of spurious withdraws, which are send when
      we are not sure whether we have advertised that routes in the past.
      If not, then export counter is decreased, but it was not increased
      before, so it overflows under zero.
      
      The patch fixes that by sendung spurious withdraws, but not counting them
      on export counter. That may lead to error in the other direction, but that
      happens only as a race condition (i.e., in normal operation filters
      return proper values about old route export state).
      6e8fb668
    • Ondřej Zajíček's avatar
      Nest: Report preferred counters also when 'import keep filtered' is enabled · 52fdd1cb
      Ondřej Zajíček authored
      Thanks to Michal Nowak for reporting the issue.
      52fdd1cb
  7. 02 Feb, 2019 1 commit
  8. 31 Jan, 2019 2 commits
  9. 30 Jan, 2019 1 commit
    • Ondřej Zajíček's avatar
      Nest: Prevent withdraws from propagation back to source protocol · e84c81b7
      Ondřej Zajíček authored
      The earlier fix loosen conditions for not running filters on old
      route when deciding about route propagation to a protocol to avoid
      issues with ghost routes in some race conditions.
      
      Unfortunately, the fix also caused back-propagation of withdraws. For
      regular updates, back-propagation is prevented in import_control hooks,
      but these are not called on withdraws. For them, import_control hooks
      are called on old routes instead, changing (old, NULL) notification
      to (NULL, NULL), which is ignored. By not calling export processing
      in some cases, the withdraw is not ignored and is back-propagated.
      
      This patch fixes that by contract conditions so the earlier fix is not
      applied to back-propagated updates.
      e84c81b7
  10. 17 Jan, 2019 1 commit
  11. 18 Dec, 2018 2 commits
  12. 16 Dec, 2018 2 commits
  13. 14 Dec, 2018 1 commit
  14. 12 Dec, 2018 2 commits
  15. 11 Dec, 2018 1 commit
    • Ondřej Zajíček's avatar
      Nest: Forbid adding channels during reconfiguration · d506263d
      Ondřej Zajíček authored
      When a new channel is found during reconfiguration, do force restart
      of the protocol, like with any other un-reconfigurable change.
      
      The old behavior was that the new channel was added but remained in down
      state, even if the protocol was up, so a manual protocol restart was
      often necessary.
      
      In the future this should be improved such that a reconfigurable
      channel addition (e.g. direct) is accepted and channel is started,
      while an un-reconfigurable addition forces protocol restart.
      d506263d
  16. 06 Dec, 2018 1 commit
    • Maria Matejka's avatar
      Custom route attributes · 265419a3
      Maria Matejka authored
      For local route marking purposes, local custom route attributes may be
      defined. These attributes are seamlessly stripped after export filter to
      every real protocol like Kernel, BGP or OSPF, they however pass through
      pipes. We currently allow at most 256 custom attributes.
      
      This should be much faster than currently used bgp communities
      for marking routes.
      265419a3
  17. 04 Dec, 2018 2 commits
    • Jan Maria Matejka's avatar
      Route table max hash size raised to 2^24. · d73c4ac8
      Jan Maria Matejka authored
      This is still OK for everybody to fit into RAM and also probably enough
      to keep a little collision rate for full BGP table.
      d73c4ac8
    • Jan Maria Matejka's avatar
      Terminology cleanup: The import_control hook is now called preexport. · 14375237
      Jan Maria Matejka authored
      Once upon a time, far far away, there were the old Bird developers
      discussing what direction of route flow shall be called import and
      export. They decided to say "import to protocol" and "export to table"
      when speaking about a protocol. When speaking about a table, they
      spoke about "importing to table" and "exporting to protocol".
      
      The latter terminology was adopted in configuration, then also the
      bird CLI in commit ea2ae6dd started to use it (in year 2009). Now
      it's 2018 and the terminology is the latter. Import is from protocol to
      table, export is from table to protocol. Anyway, there was still an
      import_control hook which executed right before route export.
      
      One thing is funny. There are two commits in April 1999 with just two
      minutes between them. The older announces the final settlement
      on config terminology, the newer uses the other definition. Let's see
      their commit messages as the git-log tool shows them (the newer first):
      
          commit 9e0e485e
          Author: Martin Mares <mj@ucw.cz>
          Date:   Mon Apr 5 20:17:59 1999 +0000
      
      	Added some new protocol hooks (look at the comments for better explanation):
      
      		make_tmp_attrs          Convert inline attributes to ea_list
      		store_tmp_attrs         Convert ea_list to inline attributes
      		import_control          Pre-import decisions
      
          commit 5056c559
          Author: Martin Mares <mj@ucw.cz>
          Date:   Mon Apr 5 20:15:31 1999 +0000
      
      	Changed syntax of attaching filters to protocols to hopefully the final
      	version:
      
      		EXPORT <filter-spec>    for outbound routes (i.e., those announced
      					by BIRD to the rest of the world).
      		IMPORT <filter-spec>    for inbound routes (i.e., those imported
      					by BIRD from the rest of the world).
      
      	where <filter-spec> is one of:
      
      		ALL                     pass all routes
      		NONE                    drop all routes
      		FILTER <name>           use named filter
      		FILTER { <filter> }     use explicitly defined filter
      
      	For all protocols, the default is IMPORT ALL, EXPORT NONE. This includes
      	the kernel protocol, so that you need to add EXPORT ALL to get the previous
      	configuration of kernel syncer (as usually, see doc/bird.conf.example for
      	a bird.conf example :)).
      
      Let's say RIP to this almost 19-years-old inconsistency. For now, if you
      import a route, it is always from protocol to table. If you export a
      route, it is always from table to protocol.
      
      And they lived happily ever after.
      14375237
  18. 28 Nov, 2018 1 commit
    • Ondřej Zajíček's avatar
      Nest: Do not hard-reset interface when preferred address is changed · e2ae0869
      Ondřej Zajíček authored
      Modify protocols to use preferred address change notification instead on
      depending on hard-reset of interfaces in that case, and remove hard-reset
      in that case. This avoids issue when e.g. IPv6 protocol restarts
      interface when IPv4 preferred address changed (as hard-reset is
      unavoidable and common for whole iface).
      
      The patch also fixes a bug when removing last address does not send
      preferred address change notification.
      e2ae0869
  19. 20 Nov, 2018 1 commit
    • Ondřej Zajíček's avatar
      The MRT protocol · 863ecfc7
      Ondřej Zajíček authored
      The new MRT protocol is responsible for periodic RIB table dumps in the
      MRT format (RFC 6396). Also the existing code for BGP4MP MRT dumps is
      refactored and splitted between BGP to MRT protocols, will be more
      integrated into MRT in the future.
      
      Example:
      
      protocol mrt {
              table "*";
              filename "%N_%F_%T.mrt";
              period 60;
      }
      
      It is partially based on the old MRT code from Pavel Tvrdik.
      863ecfc7
  20. 05 Nov, 2018 2 commits
  21. 11 Oct, 2018 1 commit
  22. 01 Oct, 2018 1 commit
  23. 18 Sep, 2018 1 commit
    • Jan Maria Matejka's avatar
      No more warnings ... · d4cebc6b
      Jan Maria Matejka authored
      no more warnings
      No more warnings over me
      And while it is being compiled all the log is black and white
      Release BIRD now and then let it flee
      
      (use the melody of well-known Oh Freedom!)
      d4cebc6b
  24. 31 Jul, 2018 1 commit
  25. 06 Jul, 2018 1 commit
    • Ondřej Zajíček's avatar
      Nest: Fix race condition during reconfiguration, part 2 · 092c4930
      Ondřej Zajíček authored
      If export filter is changed during reconfiguration and a route disappears
      between reconfiguration and refeed (e.g., if the route is a static route
      also removed during the reconfiguration), the route is not withdrawn.
      
      The issue was fixed for regular channels by an earlier patch. This patch
      fixes the issue for channels in RA_ACCEPTED mode (first-pass-the-filter),
      used by BGP with 'secondary' option.
      092c4930
  26. 03 Jul, 2018 1 commit
    • Ondřej Zajíček's avatar
      Nest: Fix race condition during reconfiguration · a81e18da
      Ondřej Zajíček authored
      If export filter is changed during reconfiguration and a route disappears
      between reconfiguration and refeed (e.g., if the route is a static route
      also removed during the reconfiguration), the route is not withdrawn.
      The patch fixes that by adding tx reconfiguration timestamp.
      a81e18da
  27. 27 Jun, 2018 1 commit
  28. 26 Jun, 2018 2 commits
  29. 30 May, 2018 1 commit
    • Jan Maria Matejka's avatar
      Nest: Removing separate tmpa from route propagation · 13c0be19
      Jan Maria Matejka authored
      This is a fundamental change of an original (1999) concept of route
      processing inside BIRD. During import/export, there was a temporary
      ea_list created which was to be used instead of the another one inside
      the route itself.
      
      This led to some confusion, quirks, and strange filter code that handled
      extended route attributes. Dropping it now.
      
      The protocol interface has changed in an uniform way -- the
      `struct ea_list *attrs` argument has been removed from store_tmp_attrs(),
      import_control(), rt_notify() and get_route_info().
      13c0be19
  30. 29 May, 2018 1 commit
  31. 18 Mar, 2018 2 commits