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.
  2. 13 Mar, 2018 3 commits
    • Jan Maria Matejka's avatar
      Filters: Removed FI_COMMA, not used for 19 years. · 74bfd2f9
      Jan Maria Matejka authored
      This instruction was removed in the commit linked below
      and never used ever again. Rest in peace.
      commit 84c7e194
      Author: Pavel Machek <pavel@ucw.cz>
      Date:   Tue Mar 2 19:49:28 1999 +0000
    • Jan Maria Matejka's avatar
      Filter: recursion to loop · 7c601e6b
      Jan Maria Matejka authored
      It was supposed to do tail-recursion in interpret() but it didn't
      compile as such. Converting it to loop makes a significant filter
      performance improvement for flat filters.
    • Maria Jan Matejka's avatar
      Filter: Instruction codes named as enum · 5a14df39
      Maria Jan Matejka authored
      The two-letter instructions were quite messy but they could be easily
      read from memory dumps. Now GDB (since 2012) supports pretty printing
      enum values and GCC checks the switch construction for missing enum
      values so we are converting the nice two-byte values to enums.
      Anyway, the enum still keeps the old two-byte values to be able to read
      the instruction codes even without GDB from plain memory dump.
  3. 07 Mar, 2018 1 commit
  4. 23 Jan, 2018 1 commit
    • Ondřej Zajíček's avatar
      IO: Fix socket priority · d6cf9961
      Ondřej Zajíček authored
      On Linux, setting the ToS will also set the priority and the range of
      accepted values is quite limited (masked by 0x1e). Therefore, 0xc0 is
      translated to a priority of 0, not something we want, overriding the
      "7" priority which was set previously explicitely. To avoid that, just
      move setting priority later in the code.
      Thanks to Vincent Bernat for the patch.
  5. 16 Jan, 2018 2 commits
  6. 03 Jan, 2018 1 commit
  7. 02 Jan, 2018 1 commit
    • Ondřej Zajíček's avatar
      Remove libhistory check · cce6ba4d
      Ondřej Zajíček authored
      According to GNU Readline developers, if we link with libreadline then
      there is no need to link with libhistory at all.
  8. 14 Dec, 2017 1 commit
  9. 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.
  10. 09 Nov, 2017 1 commit
  11. 10 Oct, 2017 3 commits
  12. 06 Oct, 2017 1 commit
  13. 04 Oct, 2017 1 commit
    • Michal 'vorner' Vaner's avatar
      RAdv: Support for more specific routes (RFC 4191) · 2a95e633
      Michal 'vorner' Vaner authored and Ondřej Zajíček's avatar Ondřej Zajíček committed
      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.
  14. 20 Sep, 2017 1 commit
  15. 19 Sep, 2017 2 commits
  16. 13 Sep, 2017 1 commit
  17. 12 Sep, 2017 2 commits
  18. 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.
  19. 05 Sep, 2017 1 commit
    • Ondřej Zajíček's avatar
      KRT: Fix IPv6 ECMP handling with Linux 4.11+ · 98bb80a2
      Ondřej Zajíček authored
      Starting from Linux 4.11, IPv6 ECMP routes are now notified using
      RTA_MULTIPATH, like IPv4 ones. The patch adds support for RTA_MULTIPATH
      parsing for IPv6 routes. This also enables to parse ECMP alien routes
      Thanks to Vincent Bernat for the original patch.
  20. 04 Sep, 2017 3 commits
  21. 30 Aug, 2017 4 commits
  22. 22 Aug, 2017 1 commit
  23. 10 Aug, 2017 2 commits
  24. 09 Aug, 2017 4 commits