1. 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
  2. 15 Dec, 2016 1 commit
    • Ondřej Zajíček's avatar
      OSPF: Fix ECMP external merging · 7d95c445
      Ondřej Zajíček authored
      The variable nfa is not cleaned before each loop iteration and can have
      a wrong value of nfa.nhs_reuse from the previous step.
      
      Thanks to Bernardo Figueiredo for the bugreport and analysis.
      7d95c445
  3. 13 Dec, 2016 1 commit
    • Ondřej Zajíček's avatar
      OSPF: Fix net-summary origination combined with stubnet option · 9e7d3a78
      Ondřej Zajíček authored
      Stubnet nodes in OSPF FIB were removed during rt_sync(), but the pointer
      remained in top_hash_entry.nf, so net-summary LSA origination was
      confused, reported 'LSA ID collision' and net-summary LSAs were not
      originated properly.
      
      Thanks to Naveen Chowdary Yerramneni for bugreport and analysis.
      9e7d3a78
  4. 08 Nov, 2016 1 commit
  5. 02 Nov, 2016 2 commits
  6. 01 Nov, 2016 1 commit
  7. 12 May, 2016 1 commit
  8. 23 Mar, 2016 2 commits
    • Ondřej Zajíček's avatar
      OSPF: Fix bogus LSA ID collisions between received and originated LSAs · 39a6b19d
      Ondřej Zajíček authored
      After restart, LSAs locally originated by the previous instance are
      received from neighbors. They are installed to LSA db and flushed. If
      export of a route triggers origination of a new external LSA before flush
      of the received one is complete, the check in ospf_originate_lsa() causes
      origination to fail (because en->nf is NULL for the old LSA and non-NULL
      for the new LSA). The patch fixes this by updating the en->nf for LSAs
      being flushed (as is already done for empty ones). Generally, en->nf
      field deserves some better description in the code.
      
      Thanks to Jigar Mehta for analyzing the problem.
      39a6b19d
    • Ondřej Zajíček's avatar
      OSPF: Fix reading from freed memory · a459f4df
      Ondřej Zajíček authored
      Thanks to Pavel Tvrdik for noticing it.
      a459f4df
  9. 25 Feb, 2016 1 commit
  10. 24 Nov, 2015 1 commit
  11. 05 Oct, 2015 1 commit
    • Ondřej Zajíček's avatar
      Major RIP redesign · 8465dccb
      Ondřej Zajíček authored
      The new RIP implementation fixes plenty of old bugs and also adds support
      for many new features: ECMP support, link state support, BFD support,
      configurable split horizon and more. Most options are now per-interface.
      8465dccb
  12. 19 Aug, 2015 1 commit
  13. 20 Jul, 2015 1 commit
  14. 08 Jun, 2015 2 commits
  15. 01 Jun, 2015 1 commit
  16. 01 May, 2015 1 commit
    • Ondřej Zajíček's avatar
      OSPF: Redesign LSA checksumming · 77edab64
      Ondřej Zajíček authored
      New LSA checksumming code separates generic Fletcher-16 and OSPF-specific
      code and avoids back and forth endianity conversions, making it much more
      readable and also several times faster.
      77edab64
  17. 28 Apr, 2015 1 commit
    • Ondřej Zajíček's avatar
      OSPF: Fixes validation of LSA checksums · 30d09eb9
      Ondřej Zajíček authored
      Prior to this patch, BIRD validates the OSPF LSA checksum by calculating
      a new checksum and comparing it with the checksum in the header. Due to
      the specifics of the Fletcher checksum used in OSPF, this is not
      necessarily correct as the checkbytes in the header may be calculated via
      a different means and end up with a different value that is nonetheless
      still correct.
      
      The documented means of validating the checksum as specified in RFC 905
      B.4 is to calculate c0 and c1 from the unchanged contents of the packet,
      which must result in a zero value to be considered valid.
      
      Thanks to Chris Boot for the patch.
      30d09eb9
  18. 18 Apr, 2015 1 commit
  19. 12 Apr, 2015 1 commit
  20. 21 Feb, 2015 1 commit
  21. 04 Nov, 2014 1 commit
  22. 03 Nov, 2014 3 commits
  23. 24 Oct, 2014 2 commits
  24. 16 Oct, 2014 1 commit
  25. 21 Jul, 2014 1 commit
  26. 19 Jul, 2014 1 commit
  27. 18 Jul, 2014 1 commit
  28. 26 Jun, 2014 1 commit
  29. 18 May, 2014 1 commit
  30. 23 Apr, 2014 1 commit
    • Ondřej Zajíček's avatar
      Extends multipath support for OSPF. · 145368f5
      Ondřej Zajíček authored
      Fixes cases where the same network or external route are propagated by
      several OSPF routes and some other corner cases in next hop construction
      and ECMP. Allows to specify whether external routes should be merged.
      
      Thanks to Peter Christensen for the original patch.
      145368f5
  31. 31 Mar, 2014 1 commit
  32. 06 Feb, 2014 3 commits
    • Ondřej Zajíček's avatar
      Fixes crash when state of disabled OSPF protocol is queried. · 10c2e1e0
      Ondřej Zajíček authored
      Thanks to Ondrej Caletka for the bugreport.
      10c2e1e0
    • Ondřej Zajíček's avatar
      Silence this annoying warning. · cba9cbf1
      Ondřej Zajíček authored
      cba9cbf1
    • Ondřej Zajíček's avatar
      Many changes in I/O and OSPF sockets and packet handling. · 48e5f32d
      Ondřej Zajíček authored
      I/O:
       - BSD: specify src addr on IP sockets by IP_HDRINCL
       - BSD: specify src addr on UDP sockets by IP_SENDSRCADDR
       - Linux: specify src addr on IP/UDP sockets by IP_PKTINFO
       - IPv6: specify src addr on IP/UDP sockets by IPV6_PKTINFO
       - Alternative SKF_BIND flag for binding to IP address
       - Allows IP/UDP sockets without tx_hook, on these
         sockets a packet is discarded when TX queue is full
       - Use consistently SOL_ for socket layer values.
      
      OSPF:
       - Packet src addr is always explicitly set
       - Support for secondary addresses in BSD
       - Dynamic RX/TX buffers
       - Fixes some minor buffer overruns
       - Interface option 'tx length'
       - Names for vlink pseudoifaces (vlinkX)
       - Vlinks use separate socket for TX
       - Vlinks do not use fixed associated iface
       - Fixes TTL for direct unicast packets
       - Fixes DONTROUTE for OSPF sockets
       - Use ifa->ifname instead of ifa->iface->name
      48e5f32d