Commit graph

310 commits

Author SHA1 Message Date
Ondrej Zajicek (work) a6f79ca57f Timers: Revert temporary names and remove old timer.h 2017-12-07 13:54:59 +01:00
Ondrej Zajicek (work) 574b232427 Timers: Fix TBF and some last remains 2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) 6b5cd7c05f Sysdep: Remove old timer code 2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) ee528fbd5d Timers: Add typecast to unit-converting macros 2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) 212eda07c4 Timers: Fix tests after timer change 2017-12-07 13:49:27 +01:00
Ondrej Zajicek (work) 49fc021337 Printf: Add support for microsecond times
Use '%t' in bsnprintf() for microsecond times (in btime) with variable
sub-second precision.
2017-12-07 13:49:27 +01:00
Ondrej Zajicek (work) f047271cb9 Timers: Parse and format functions for microsecond times
Date/time output (e.g. in logs, show commands) can use %f to specify
subsecond time. By default, millisecond precision is used in output.
2017-12-07 13:49:27 +01:00
Ondrej Zajicek (work) 025525266f Timers: Replace old timers with microsecond timers
The old timer interface is still kept, but implemented by new timers. The
plan is to switch from the old inteface to the new interface, then clean
it up.
2017-12-07 13:49:27 +01:00
Ondrej Zajicek (work) 28a7d3943e Timers: Integrate microsecond timers to the main loop 2017-12-07 13:46:53 +01:00
Ondrej Zajicek (work) 534215a18f Timers: Split microsecond timers from BFD code to lib 2017-12-07 13:46:53 +01:00
Ondrej Zajicek (work) 734e9fb8a9 Minor cleanups and fixes 2017-05-23 13:12:25 +02:00
Ondrej Zajicek (work) bb7aa06a48 Fix type mixing in flowspec formatting
Variable of u64 type was passed to vararg function as uint.
2017-05-19 00:36:37 +02:00
Ondrej Zajicek (work) d19617f06b Merge remote-tracking branch 'origin/int-new' into int-new 2017-05-17 14:50:00 +02:00
Jan Moskyto Matejka 05d47bd53e Linpool: default allocation size 2017-05-16 15:34:57 +02:00
Ondrej Zajicek (work) 1c5b4c5d5b Merge branch 'master' into int-new 2017-05-16 14:56:01 +02:00
Ondrej Zajicek (work) b845ea097c Remove autoconf macros for time_t and alignment
Replaced by constant compile-time expressions. CPU_STRUCT_ALIGN is not
really correct, but is consistent with the old behavior.
2017-05-16 13:05:00 +02:00
Ondrej Zajicek (work) 5ca4bd5d90 Flowspec: Max tcp mask length is 12 bits 2017-04-26 17:13:45 +02:00
Jan Moskyto Matejka 69fddac052 Merge branch 'int-new' of gitlab.labs.nic.cz:labs/bird into int-new 2017-04-26 12:30:22 +02:00
Jan Moskyto Matejka 93a3661c15 Flowspec: split net_format_flowspec into several functions 2017-04-26 12:26:14 +02:00
Ondrej Zajicek (work) 4278abfe27 Check validity of dest w.r.t. net_type
Allow to define static roa/flow routes without dest.
2017-04-18 13:56:40 +02:00
Jan Moskyto Matejka 2282030b2a Simpler format of VPN RD 2017-03-28 17:35:32 +02:00
Ondrej Zajicek (work) 1e37e35c3e BGP: Support for MPLS labels and VPN SAFI
Basic support for SAFI 4 and 128 (MPLS labeled IP and VPN) for IPv4 and
IPv6. Should work for route reflector, but does not properly handle
originating routes with next hop self.

Based on patches from Jan Matejka.
2017-03-22 18:16:49 +01:00
Jan Moskyto Matejka 3c74416465 Nexthop: Fixed recursive route mpls label merging 2017-03-17 15:48:32 +01:00
Ondrej Zajicek (work) a5d2a34497 Minor cleanups
BTW, 'prefices' is hypercorrection, as 'prefix' is from 'praefixum' with
plural 'praefixa'.
2017-03-14 17:25:42 +01:00
Jan Moskyto Matejka 8c9986d310 Filters: VPN Route Distinguishers, Prefix Type, Docs Update 2017-03-13 13:51:20 +01:00
Ondrej Zajicek (work) 7126cadf80 Static: Minor overhaul
The patch fixes several bugs introduced in previous changes, simplifies
the protocol by handing routes uniformly, introduces asynchronous route
processing to avoid issues with separate notifications for each next-hop
in ECMP routes, and makes reconfiguration faster by avoiding quadratic
complexity.
2017-03-09 13:47:00 +01:00
Jan Moskyto Matejka c609d03986 Merge branch 'int-new' into nexthop-merged 2017-02-22 11:58:04 +01:00
Ondrej Zajicek (work) 62e64905b7 Several minor fixes 2017-02-20 02:26:45 +01:00
Ondrej Zajicek (work) c259669fa3 Merge branch 'master' into int-new 2017-02-08 14:34:48 +01:00
Jan Moskyto Matejka d311368bc5 VPN4 and VPN6 literals
From now on, protocol static accepts VPN4 and VPN6 addressess.
With some concerns about VPN6 Route Distinguishers, I finally chose
to have the same format as for VPN4 (where it is defined by RFC 4364).
2016-12-22 21:38:33 +01:00
Jan Moskyto Matejka d14f8c3c45 Netlink: MPLS routes in kernel
Anyway, Bird is now capable to insert both MPLS routes and MPLS encap
routes into kernel.

It was (among others) needed to define platform-specific AF_MPLS to 28
as this constant has been assigned in the linux kernel.

No support for BSD now, it may be added in the future.
2016-12-22 21:38:33 +01:00
Jan Moskyto Matejka 33ad6e0188 MPLS: added net_addr_mpls variant of net_addr 2016-12-22 13:35:16 +01:00
Ondrej Zajicek (work) eeba61ccd5 Minor cleanups 2016-12-13 20:18:11 +01:00
Ondrej Zajicek (work) ac3ad139f6 BGP: Add support for flowspec (RFC 5575) 2016-12-07 18:29:34 +01:00
Ondrej Zajicek (work) a7848dd880 Client: No need for birdlib functions 2016-12-07 16:20:38 +01:00
Ondrej Zajicek (work) 77234bbbde Basic flow specification support (RFC 5575)
Add flow4/flow6 network and rt-table type and operations, config grammar
and static protocol support.

Squashed flowspec branch from Pavel Tvrdik.
2016-12-07 15:54:19 +01:00
Jan Moskyto Matejka ad88b94bca Merge branch 'int-new-rpki-squashed' (early part) into int-new 2016-12-07 15:30:46 +01:00
Ondrej Zajicek (work) d15b0b0a1b BGP redesign
Integrated and extensible BGP with generalized AFI handling,
support for IPv4+IPv6 AFI and unicast+multicast SAFI.
2016-12-07 14:20:52 +01:00
Jan Moskyto Matejka af62c0f9f1 LibSSH may be switched off together with RPKI 2016-12-07 14:15:35 +01:00
Pavel Tvrdik 69ae578450 Add `.asn' operator to all ROA prefixes in filters
Example:
  bird> eval (1.2.0.0/16 max 20 as 1234).asn
  1234

Todo: Should be described in user docs
2016-12-07 09:35:24 +01:00
Pavel Tvrdík 65d2a88dd2 RPKI protocol with one cache server per protocol
The RPKI protocol (RFC 6810) using the RTRLib
(http://rpki.realmv6.org/) that is integrated inside
the BIRD's code.

Implemeted transports are:
 - unprotected transport over TCP
 - secure transport over SSHv2

Example configuration of bird.conf:
  ...
  roa4 table r4;
  roa6 table r6;

  protocol rpki {
    debug all;

    # Import both IPv4 and IPv6 ROAs
    roa4 { table r4; };
    roa6 { table r6; };

    # Set cache server (validator) address,
    # overwrite default port 323
    remote "rpki-validator.realmv6.org" port 8282;

    # Overwrite default time intervals
    retry   10;         # Default 600 seconds
    refresh 60;         # Default 3600 seconds
    expire 600;         # Default 7200 seconds
  }

  protocol rpki {
    debug all;

    # Import only IPv4 routes
    roa4 { table r4; };

    # Set cache server address to localhost,
    # use default ports tcp => 323 or ssh => 22
    remote 127.0.0.1;

    # Use SSH transport instead of unprotected transport over TCP
    ssh encryption {
      bird private key "/home/birdgeek/.ssh/id_rsa";
      remote public key "/home/birdgeek/.ssh/known_hosts";
      user "birdgeek";
    };
  }
  ...
2016-12-07 09:35:24 +01:00
Ondrej Zajicek (work) ed1a908e53 BGP: Fix memory leak in graceful restart code
Prefix and bucket tables are initialized when entering established state
but not explicitly freed when leaving it (that is handled by protocol
restart). With graceful restart, BGP may enter and leave established
state multiple times without hard protocol restart causing memory leak.
2016-11-25 11:51:38 +01:00
Pavel Tvrdik bb721f0d6d Add lp_strdup function for string duplication on linpool 2016-11-16 12:22:01 +01:00
Pavel Tvrdik 5e3cd0e5b5 Birdtest: Replace BT_SUCCESS and BT_FAILURE with 1 and 0 2016-11-11 17:43:09 +01:00
Ondrej Zajicek (work) 9b0a0ba9e6 Unit Testing for BIRD
- Unit Testing Framework (BirdTest)
 - Integration of BirdTest into the BIRD build system
 - Tests for several BIRD modules

 Based on squashed Pavel Tvrdik's int-test branch, updated for
 current int-new branch.
2016-11-09 16:36:34 +01:00
Ondrej Zajicek (work) 8860e991f6 Merge branch 'master' into int-new 2016-11-08 19:27:58 +01:00
Ondrej Zajicek (work) c8cafc8ebb Minor code cleanups 2016-11-08 17:46:29 +01:00
Ondrej Zajicek (work) cc5b93f72d Merge tag 'v1.6.2' into int-new 2016-11-08 17:04:29 +01:00
Ondrej Zajicek (work) 920a86e849 Add missing extern 2016-11-03 09:53:53 +01:00
Ondrej Zajicek (work) 390601f038 RIP: Use message authentication interface
Based on former commit from Pavel Tvrdik
2016-11-02 17:53:22 +01:00