1. 03 Jul, 2019 1 commit
  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. 20 Feb, 2019 2 commits
    • Maria Matejka's avatar
    • Maria Matejka's avatar
      Filter refactoring: dropped the recursion from the interpreter · 4c553c5a
      Maria Matejka authored
      This is a major change of how the filters are interpreted. If everything
      works how it should, it should not affect you unless you are hacking the
      filters themselves.
      
      Anyway, this change should make a huge improvement in the filter performance
      as previous benchmarks showed that our major problem lies in the
      recursion itself.
      
      There are also some changes in nest and protocols, related mostly to
      spreading const declarations throughout the whole BIRD and also to
      refactored dynamic attribute definitions. The need of these came up
      during the whole work and it is too difficult to split out these
      not-so-related changes.
      4c553c5a
  4. 14 Dec, 2018 1 commit
  5. 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
  6. 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
  7. 01 Oct, 2018 1 commit
  8. 03 Jul, 2018 1 commit
  9. 26 Jun, 2018 2 commits
  10. 13 Jun, 2018 1 commit
  11. 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
  12. 29 May, 2018 1 commit
  13. 24 May, 2018 1 commit
    • Ondřej Zajíček's avatar
      Do not initialize route metrics in import_control hook · feae132e
      Ondřej Zajíček authored
      During route export, the receiving protocol often initialized route
      metrics to default value in its import_control hook before export filter
      was executed. This is inconsistent with the expectation that an export
      filter would process the same route as one in the routing table and it
      breaks setting these metrics before (e.g. for static routes directly in
      static protocol).
      
      The patch removes the initialization of route metrics in import_control
      hook, the default values are already handled in rt_notify hook called
      after export filters.
      
      The patch also changed the behavior of OSPF to keep metrics when a route
      is reannounced between OSPF instances (to be consistent with other
      protocols) and the behavior when both ospf_metric1 and ospf_metric2
      are specified (to have more expected behavior).
      feae132e
  14. 03 May, 2018 2 commits
    • Ondřej Zajíček's avatar
      Babel: Add option to randomize router ID · 70fab178
      Ondřej Zajíček authored
      When a Babel node restarts, it loses its sequence number, which can cause
      its routes to be rejected by peers until the state is cleared out by other
      nodes in the network (which can take on the order of minutes).
      
      There are two ways to fix this: Having stable storage to keep the sequence
      number across restarts, or picking a different router ID each time.
      
      This implements the latter, by introducing a new option that will cause
      BIRD to randomize a high 32 bits of router ID every time it starts up.
      This avoids the problem at the cost of not having stable router IDs in
      the network.
      
      Thanks to Toke Hoiland-Jorgensen for the patch.
      70fab178
    • Ondřej Zajíček's avatar
      Babel: Fix type of route entry router ID · 23b07904
      Ondřej Zajíček authored
      The router ID being assigned to routes was a uint, which discards the
      upper 32 bits. This also has the nice side effect of echoing the wrong
      router ID back to other routers.
      
      Thanks to Toke Hoiland-Jorgensen for the patch.
      23b07904
  15. 07 Mar, 2018 1 commit
  16. 13 Feb, 2018 2 commits
    • Ondřej Zajíček's avatar
      Babel: Fix accidental bitwise or assignment · 5ce7adfc
      Ondřej Zajíček authored
      Fix an accidental bitwise or assignment that was supposed to be a
      comparison.
      
      Thanks to Toke Hoiland-Jorgensen for the patch.
      5ce7adfc
    • Ondřej Zajíček's avatar
      Babel: Add source-specific routing support · 185a0a51
      Ondřej Zajíček authored
      This patch adds support for source-specific routing to the Babel protocol.
      It changes the protocol to support both NET_IP6 and NET_IP6_SADR channels
      for IPv6 addresses. If only a NET_IP6 channel is configured,
      source-specific updates are ignored. Otherwise, non-source-specific
      routes are simply treated as source-specific routes with SADR prefix 0.
      
      Thanks to Toke Hoiland-Jorgensen for the original patch.
      Minor changes by Ondrej Santiago Zajicek.
      185a0a51
  17. 07 Dec, 2017 13 commits
  18. 28 Nov, 2017 1 commit
    • Ondřej Zajíček's avatar
      Babel: Parse flags in Hello TLV · 1e8721e2
      Ondřej Zajíček authored
      RFC6126bis introduces a flags field for the Hello TLV, and adds a unicast flag
      that is used to signify that a hello was sent as unicast. This adds parsing of
      the flags field and ignores such unicast hellos, which preserves compatibility
      until we can add a proper implementation of the unicast hello mechanism.
      
      Thanks to Toke Hoiland-Jorgensen for the patch.
      1e8721e2
  19. 17 Oct, 2017 1 commit
  20. 19 Sep, 2017 1 commit
    • Ondřej Zajíček's avatar
      BGP: Shutdown communication (RFC 8203) · cd1d9961
      Ondřej Zajíček authored
      The patch implements BGP Administrative Shutdown Communication (RFC 8203)
      allowing BGP operators to pass messages related to BGP session
      administrative shutdown/restart. It handles both transmit and receive of
      shutdown messages. Messages are logged and may be displayed by show
      protocol all command.
      
      Thanks to Job Snijders for the basic patch.
      cd1d9961
  21. 06 Sep, 2017 1 commit
    • Ondřej Zajíček's avatar
      Basic VRF support · 943478b0
      Ondřej Zajíček authored
      Add basic VRF (virtual routing and forwarding) support. Protocols can be
      associated with VRFs, such protocols will be restricted to interfaces
      assigned to the VRF (as reported by Linux kernel) and will use sockets
      bound to the VRF. E.g., different multihop BGP instances can use diffent
      kernel routing tables to handle BGP TCP connections.
      
      The VRF support is preliminary, currently there are several limitations:
      
      - Recent Linux kernels (4.11) do not handle correctly sockets bound
      to interaces that are part of VRF, so most protocols other than multihop
      BGP do not work. This will be fixed by future kernel versions.
      
      - Neighbor cache ignores VRFs. Breaks config with the same prefix on
      local interfaces in different VRFs. Not much problem as single hop
      protocols do not work anyways.
      
      - Olock code ignores VRFs. Breaks config with multiple BGP peers with the
      same IP address in different VRFs.
      
      - Incoming BGP connections are not dispatched according to VRFs.
      Breaks config with multiple BGP peers with the same IP address in
      different VRFs. Perhaps we would need some kernel API to read VRF of
      incoming connection? Or probably use multiple listening sockets in
      int-new branch.
      
      - We should handle master VRF interface up/down events and perhaps
      disable associated protocols when VRF goes down. Or at least disable
      associated interfaces.
      
      - Also we should check if the master iface is really VRF iface and
      not some other kind of master iface.
      
      - BFD session request dispatch should be aware of VRFs.
      
      - Perhaps kernel protocol should read default kernel table ID from VRF
      iface so it is not necessary to configure it.
      
      - Perhaps we should have per-VRF default table.
      943478b0
  22. 14 Jun, 2017 1 commit
  23. 09 Jun, 2017 2 commits
    • Ondřej Zajíček's avatar
      Babel: Parse sub-TLVs and skip TLVs with mandatory sub-TLV · 145ebfa1
      Ondřej Zajíček authored
      RFC6126bis formally introduces sub-TLVs to the Babel protocol, including
      mandatory sub-TLVs. This adds support for parsing sub-TLVs to the Babel
      protocol and skips TLVs that contain mandatory sub-TLVs, as per the spec.
      
      For details, see section 4.4 of
      https://tools.ietf.org/html/draft-ietf-babel-rfc6126bis-02
      
      Thanks to Toke Høiland-Jørgensen <toke@toke.dk> for the patch.
      145ebfa1
    • Ondřej Zajíček's avatar
      Babel: Implement IPv6 prefix compression on outgoing updates · b3c6273e
      Ondřej Zajíček authored
      Previously, the Babel protocol would never use prefix compression on outgoing
      updates (but would parse it on incoming ones). This adds compression of IPv6
      addresses of outgoing updates.
      
      The compression only works to the extent that the FIB is walked in lexicographic
      order; i.e. a prefix is only compressed if it shares bytes with the previous
      prefix in the same packet.
      
      Thanks to Toke Høiland-Jørgensen <toke@toke.dk> for the patch.
      b3c6273e