1. 08 Nov, 2018 1 commit
    • Ondřej Zajíček's avatar
      Nest: Improve keeping track of IPv6 link-local addresses · 81489b79
      Ondřej Zajíček authored
      Most protocols in IPv6 mode use link-local source addresses and expect
      that there is one on each active interface. The old code depended on
      assumption that if there is some IPv6 address on iface, there is also an
      IPv6 link-local address on that iface (added by kernel when the iface
      went up). Unfortunately, that is not generally true, as a configured
      global address sometimes ceases to be tentative (finishes DOD) before
      a link-local address on the same iface. In such case a protocol iface
      (namely RAdv and Babel) is activated, but fails to found link-local
      address and stays in failed state.
      
      The patch fixes that by tracking 'primary' IPv6 link-local address,
      sending iface restart notifications when it changes and making
      protocols ignore iface-up notifications when no such address is
      selected for an iface.
      81489b79
  2. 05 Nov, 2018 1 commit
  3. 18 Sep, 2018 1 commit
    • Ondřej Zajíček's avatar
      The MRT protocol · c0fc3e67
      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.
      c0fc3e67
  4. 17 Jul, 2018 1 commit
  5. 06 Jul, 2018 1 commit
    • Ondřej Zajíček's avatar
      Nest: Fix race condition during reconfiguration, part 2 · 470efcb9
      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.
      470efcb9
  6. 03 Jul, 2018 1 commit
    • Ondřej Zajíček's avatar
      Nest: Fix race condition during reconfiguration · cbfdf6ed
      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.
      cbfdf6ed
  7. 23 Apr, 2018 1 commit
  8. 14 Mar, 2018 1 commit
    • Jan Maria Matejka's avatar
      Filter: make bgpmask literals real constructors · e8bc64e3
      Jan Maria Matejka authored
      The bgpmask literals can include expressions. This is OK but they have
      to be interpreted as soon as the code is run, not in the time the code
      is used as value.
      
      This led to strange behavior like rewriting bgpmasks when they shan't
      be rewritten:
      
      	function mask_generator(int as)
      	{
      		return [= * as * =];
      	}
      
      	function another()
      	bgpmask m1;
      	bgpmask m2;
      	{
      		m1 = mask_generator(10);
      		m2 = mask_generator(20);
      		if (m1 == m2) {
      			print("strange"); # this would happen
      		}
      	}
      
      Moreover, sending this to CLI would cause stack overflow and knock down the
      whole BIRD, as soon as there is at least one route to execute the given
      filter on.
      
      	show route filter bgpmask mmm; bgppath ppp; { ppp = +empty+; mmm = [= (ppp ~ mmm) =]; print(mmm); accept; }
      
      The magic match operator (~) inside the bgpmask literal would try to
      resolve mmm, which points to the same bgpmask so it would resolve
      itself, call the magic match operator and vice versa.
      
      After this patch, the bgpmask literal will get resolved as soon as it's
      assigned to mmm and it also will return a type error as bool is not
      convertible to ASN in BIRD.
      e8bc64e3
  9. 16 Jan, 2018 1 commit
    • Ondřej Zajíček's avatar
      Filter: Allow silent filter execution · b9405791
      Ondřej Zajíček authored
      A filter should log messages only if executed explicitly (e.g., during
      route export or route import). When a filter is executed for technical
      reasons (e.g., to establish whether a route was exported before), it
      should run silently.
      b9405791
  10. 03 Jan, 2018 1 commit
  11. 14 Dec, 2017 1 commit
  12. 04 Oct, 2017 1 commit
    • Michal 'vorner' Vaner's avatar
      RAdv: Support for more specific routes (RFC 4191) · 2a95e633
      Michal 'vorner' Vaner authored
      The patch implements Default Router Preferences and More-Specific Routes
      (RFC 4191) for RAdv protocol, allowing to announce router preference and
      more specific routes in router advertisements. Routes can be exported to
      RAdv like to regular routing protocols.
      
      Some cleanups, bugfixes and other changes done by Ondrej Zajicek.
      2a95e633
  13. 19 Sep, 2017 2 commits
    • 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
    • Michal 'vorner' Vaner's avatar
      Docs: FIB iteration macros · 7b2c5f3d
      Michal 'vorner' Vaner authored
      7b2c5f3d
  14. 12 Sep, 2017 2 commits
  15. 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
  16. 10 Aug, 2017 2 commits
  17. 31 May, 2017 1 commit
  18. 25 May, 2017 1 commit
  19. 15 Nov, 2016 1 commit
  20. 02 Nov, 2016 3 commits
  21. 01 Nov, 2016 1 commit
  22. 13 Oct, 2016 1 commit
  23. 12 Oct, 2016 3 commits
  24. 04 Oct, 2016 1 commit
  25. 03 Oct, 2016 1 commit
    • Ondřej Zajíček's avatar
      BGP: Support for large communities · 66dbdbd9
      Ondřej Zajíček authored
      Add support for large communities (draft-ietf-idr-large-community),
      96bit alternative to RFC 1997 communities.
      
      Thanks to Matt Griswold for the original patch.
      66dbdbd9
  26. 15 Sep, 2016 1 commit
    • Pavel Tvrdik's avatar
      rt-table: Fix kernel protocol export filter memory bug · a290da25
      Pavel Tvrdik authored
      Kernel protocol calls rt_export_merged(), which used @rte_update_pool for
      temporary allocations, supposing it is called from other functions from
      rt-table.c that handles locking and flushing of the linpool. Therefore,
      linpool was not flushed properly and memory leaked.
      
      Add linpool argument to rt_export_merged() and use @krt_filter_lp when
      called from kernel protocol.
      
      Thanks to Justin Cattle and Alexander Frolkin for the bugreport.
      
      (Commit squashed and updated by Ondrej Zajicek)
      a290da25
  27. 14 Sep, 2016 1 commit
  28. 16 Aug, 2016 1 commit
  29. 19 Jul, 2016 1 commit
  30. 17 Jul, 2016 1 commit
  31. 08 Jun, 2016 1 commit
  32. 12 May, 2016 1 commit
  33. 28 Apr, 2016 1 commit
    • Ondřej Zajíček's avatar
      Add the Babel routing protocol (RFC 6126) · 937e75d8
      Ondřej Zajíček authored
      This patch implements the IPv6 subset of the Babel routing protocol.
      Based on the patch from Toke Hoiland-Jorgensen, with some heavy
      modifications and bugfixes.
      
      Thanks to Toke Hoiland-Jorgensen for the original patch.
      937e75d8