1. 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
  2. 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
  3. 03 Jan, 2018 1 commit
  4. 14 Dec, 2017 1 commit
  5. 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
  6. 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
  7. 12 Sep, 2017 2 commits
  8. 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
  9. 10 Aug, 2017 2 commits
  10. 31 May, 2017 1 commit
  11. 25 May, 2017 1 commit
  12. 15 Nov, 2016 1 commit
  13. 02 Nov, 2016 3 commits
  14. 01 Nov, 2016 1 commit
  15. 13 Oct, 2016 1 commit
  16. 12 Oct, 2016 3 commits
  17. 04 Oct, 2016 1 commit
  18. 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
  19. 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
  20. 14 Sep, 2016 1 commit
  21. 16 Aug, 2016 1 commit
  22. 19 Jul, 2016 1 commit
  23. 17 Jul, 2016 1 commit
  24. 08 Jun, 2016 1 commit
  25. 12 May, 2016 1 commit
  26. 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
  27. 08 Apr, 2016 1 commit
  28. 07 Apr, 2016 1 commit
  29. 06 Apr, 2016 1 commit
    • Ondřej Zajíček's avatar
      KRT: Fix route learn scan when route changed · e86cfd41
      Ondřej Zajíček authored
      When a kernel route changed, function krt_learn_scan() noticed that and
      replaced the route in internal kernel FIB, but after that, function
      krt_learn_prune() failed to propagate the new route to the nest, because
      it confused the new route with the (removed) old best route and decided
      that the best route did not changed.
      
      Wow, the original code (and the bug) is almost 17 years old.
      e86cfd41
  30. 17 Mar, 2016 1 commit
  31. 16 Feb, 2016 1 commit
  32. 09 Nov, 2015 2 commits
    • Ondřej Zajíček's avatar
      Nest: Fixes bug in missing cleanup during table removal · 86b4e170
      Ondřej Zajíček authored
      When a table is removed during reconfiguration, a reference was not
      cleared in the old configuration, which breaks undo.
      86b4e170
    • Ondřej Zajíček's avatar
      Conf: Fixes bug in symbol lookup during reconfiguration · 9b9a7143
      Ondřej Zajíček authored
      Symbol lookup by cf_find_symbol() not only did the lookup but also added
      new void symbols allocated from cfg_mem linpool, which gets broken when
      lookups are done outside of config parsing, which may lead to crashes
      during reconfiguration.
      
      The patch separates lookup-only cf_find_symbol() and config-modifying
      cf_get_symbol(), while the later is called only during parsing. Also
      new_config and cfg_mem global variables are NULLed outside of parsing.
      9b9a7143