1. 30 Apr, 2019 3 commits
  2. 12 Apr, 2019 1 commit
  3. 08 Apr, 2019 1 commit
    • Ondřej Zajíček's avatar
      BGP: Handle corner cases in event ordering · 4a50c8bd
      Ondřej Zajíček authored
      When BGP connection is opened, it may happen that rx hook (with remote
      OPEN) is called before tx hook (for local OPEN). Therefore, we need to do
      internal changes (like setting local_caps) synchronously with OPENSENT
      transition and we need to ensure that OPEN is sent before KEEPALIVE.
      4a50c8bd
  4. 03 Apr, 2019 1 commit
    • Ondřej Zajíček's avatar
      BGP: Promiscuous ASN mode · 23ee6b1c
      Ondřej Zajíček authored
      Allow to specify just 'internal' or 'external' for remote neighbor
      instead of specific ASN. In the second case that means BGP peers with
      any non-local ASNs are accepted.
      23ee6b1c
  5. 02 Apr, 2019 1 commit
  6. 19 Mar, 2019 1 commit
  7. 18 Mar, 2019 1 commit
  8. 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
  9. 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
  10. 17 Feb, 2019 1 commit
    • Ondřej Zajíček's avatar
      OSPF: Reset LSAs during area type change · bf8d7bba
      Ondřej Zajíček authored
      When area is reconfigured to a different type, we need to flush LSAs as
      they may not be valid (e.g. NSSA-LSA for non-NSSA area). Also, when we
      have have just one OSPF area and that changes type, we could restart OSPF
      as there is no state to keep anyway. That solves issue with different
      handling of external routes exported to OSPF based of main area type.
      bf8d7bba
  11. 13 Feb, 2019 1 commit
  12. 09 Feb, 2019 1 commit
  13. 03 Feb, 2019 4 commits
  14. 01 Feb, 2019 1 commit
  15. 31 Jan, 2019 2 commits
  16. 26 Jan, 2019 2 commits
  17. 24 Jan, 2019 1 commit
  18. 02 Jan, 2019 2 commits
    • Ondřej Zajíček's avatar
      BGP: Better dispatch of incoming connections · 470740f9
      Ondřej Zajíček authored
      Since v2 we have multiple listening BGP sockets, and each BGP protocol
      has associated one of them. Use listening socket that accepted the
      incoming connection as a key in the dispatch process so only BGP
      protocols assocaited with that listening socket can be selected.
      This is necesary for proper dispatch when VRFs are used.
      470740f9
    • Ondřej Zajíček's avatar
      BGP: Postpone setting link_addr · e16b0aef
      Ondřej Zajíček authored
      It may happen that the LLv6 address for given iface is not defined during
      BGP start, so we postpone the check to the the session establishment.
      e16b0aef
  19. 18 Dec, 2018 1 commit
  20. 17 Dec, 2018 1 commit
    • Ondřej Zajíček's avatar
      OSPF: Fix wrong LSA collisions detection · cea2e25f
      Ondřej Zajíček authored
      In some circumstances (old LSA flushed but not acknowledged and not
      removed) origination of a new LSA may wrongly triggers LSA collision
      code. The patch fixes that.
      
      Thanks to Asbjorn Mikkelsen for the bugreport and @mdelagueronniere
      for the original patch.
      cea2e25f
  21. 16 Dec, 2018 2 commits
    • Ondřej Zajíček's avatar
      BGP: Extend 'next hop keep' and 'next hop self' options · 1cab2b4a
      Ondřej Zajíček authored
      Extend 'next hop keep' and 'next hop self' options to have boolean values
      (enabled / disabled) and also values 'ibgp'/ 'ebgp' to restrict it to
      routes received from IBGP / EBGP. This allows to have it enabled by
      default in some cases, matches features of other implementations, and
      allows to handle some strange cases like EBGP border router with 'next
      hop self' also doing IBGP route reflecting.
      
      Change default of 'next hop keep' to enabled for route servers, and
      'ibgp' for route reflectors.
      
      Update documentation for these options.
      1cab2b4a
    • Ondřej Zajíček's avatar
      cb311b44
  22. 14 Dec, 2018 1 commit
  23. 12 Dec, 2018 3 commits
    • Ondřej Zajíček's avatar
      BGP: Do not prepend ASN in export from non-RS EBGP to RS EBGP · 532116e7
      Ondřej Zajíček authored
      When route is exported to regular EBGP, local ASN should be prepended to
      AS_PATH. When route is propagated by route server (between RS-marked
      EBGP peers), it should not change AS_PATH. Question is what to do in
      other cases (from non-RS EBGP, IBGP, or locally originated to RS EBGP).
      
      In 1.6.x, we did not prepend ASN in non-RS EBGP or IBGP to RS EBGP, but
      we prepended in local to RS EBGP.
      
      In 2.0.x, we changed that so only RS-EBGP to RS-EBGP is not prepended.
      We received some negative responses (thanks to heisenbug and Alexander
      Zubkov), we decided to change it back. One reason is that it is simple
      to modify the AS_PATH by filters, but not possible to un-modify
      changes done by BGP itself. Also, as 1.6.x behavior was not really
      consistent, the final behavior is that ASN is never prepended when
      exported to RS EBGP, like to IBGP.
      
      Note that i do not express an opinion about whether such configurations
      are even reasonable.
      532116e7
    • Ondřej Zajíček's avatar
      Update RFC references · 0f40405f
      Ondřej Zajíček authored
      Progdoc comments do not allow SGML tags
      0f40405f
    • Ondřej Zajíček's avatar
      BGP: implement Adj-RIB-In · 682d3f7d
      Ondřej Zajíček authored
      The patch implements optional internal import table to a channel and
      hooks it to BGP so it can be used as Adj-RIB-In. When enabled, all
      received (pre-filtered) routes are stored there and import filters can
      be re-evaluated without explicit route refresh. An import table can be
      examined using e.g. 'show route import table bgp1.ipv4'.
      682d3f7d
  24. 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
  25. 10 Dec, 2018 1 commit
    • Ondřej Zajíček's avatar
      OSPF: Fix reconfiguration of vlinks · baeacdcf
      Ondřej Zajíček authored
      Fix crash during reconfiguration of OSPF config with vlinks. When vlink
      is reconfigured, a generic iface-reconfiguration code is used, which in
      one place supposes that it is running on a regular iface.
      
      Thanks to Cybertinus for a bugreport.
      baeacdcf
  26. 04 Dec, 2018 1 commit
    • 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
  27. 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
  28. 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
  29. 26 Oct, 2018 1 commit