Commit graph

3101 commits

Author SHA1 Message Date
Ondrej Zajicek (work) 46434a3cad Merge commit '7b2c5f3d2826e3175bf31b1c36056c9efc587a2b' into int-new 2017-12-07 18:35:46 +01:00
Ondrej Zajicek (work) 4ff15a75c5 Merge commit '98bb80a243b58c43453e9be69d19d0350286549c' into int-new 2017-12-07 17:41:09 +01:00
Ondrej Zajicek (work) cd80c9b070 BSD: Fix in the last commit 2017-12-07 14:21:38 +01:00
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) 3b3b0910ff Babel: More changes and bugfixes
Several changes and bugfixes in Babel, namely:

- Exported route parameters stored directly in route table entry
- Exported non-babel routes no longer stored in per-entry route list
- Route update, selection and retraction simplified and fixed
- Route feasibility is evalualated per update and stored with route
- Unreachable route handling fixed, based on hold interval
- Added 'show babel routes' command

Overall, it fixes some issues with proper propagation of triggered
updates, making Babel convergence after topology change almost
instant.
2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) dbf1ed263c Babel: Fix handling of seqno requests
Old behavior has several deficiencies compared to standard behavior
(no triggered updates for replies, no retransmissions, ...).
2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) 672fb78e12 Babel: Fix handling of IPv4 retractions
Babel TLV parsing code rejected IPv4 retractions without next-hop,
although next-hop is needed just for regular updates.
2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) 268dc7c8b3 Babel: Remove babel_proto ptr from babel_entry 2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) 738a57b69b Babel: Fix hello timeout for short hello intervals 2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) b47eaefe12 Babel: Revamp cost computation and run route selection when cost change
Also fix several minor bugs and add 'limit' option for k-out-of-j
link sensing strategy. Change default from 8-of-16 to 12-of-16.
Change IHU expiry factor from 1.5 to 3.5 (as in RFC 6126).
2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) f00221fadb Babel: Fix unicast seqno requests 2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) 38f4721092 Babel: Avoid batch seqno updates 2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) 5ee69d11f2 Babel: Fix Hello and IHU expiration 2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) 8b58f565e4 Babel: Update to new timers 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) 3e405fb188 Nest: Update to new timers 2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) cc881bd155 BGP: Update to new timers 2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) b32d557a6e OSPF: Update to new timers
Note that recurrent timers are currently limited to ~1 hour.
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) 92cc1e7457 RIP: Update to new timers 2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) c521b3ac32 RAdv: Update to new timers 2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work) d59c1a2958 RPKI: Update to new timers 2017-12-07 13:52:21 +01:00
Ondrej Zajicek (work) 21f4f0f4b0 Kernel: Update to new timers 2017-12-07 13:52:21 +01:00
Ondrej Zajicek (work) d3fa9e84e9 Timers: Show sub-second times in some protocol outputs 2017-12-07 13:49:27 +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) 7c454d9186 BSD: Minor fix of penultimate commit 2017-12-07 13:44:00 +01:00
Ondrej Zajicek (work) abae1cc58b KRT: Minor fix of last commit 2017-12-07 13:28:24 +01:00
Ondrej Zajicek (work) 153f02da3b Nest: Maintain separate IPv4, IPv6 and LLv6 preferred addresses
Also redesign preferred address selection and update protocols to use
appropriate preferred address.

Based on a previous work by Jan Maria Matejka.
2017-12-07 13:06:01 +01:00
Jan Maria Matejka 4ae3ee1200 Babel: Interface address irrelevant for interface pattern matching. 2017-10-17 16:52:18 +02:00
Jan Moskyto Matejka 289c1a7968 Iface address debug dump fix 2017-10-17 16:52:18 +02:00
Ondrej Zajicek (work) 2d7fb19c3c OSPF: Add option to disable OSPFv3-AF 2017-10-10 16:10:02 +02:00
Ondrej Zajicek (work) 2549300b54 OSPF: Fix minor issue in TTL check
The TTL check must be done after instance ID dispatch to avoid warnings
when a physical iface is shared by multiple instances and some use TTL
security and some not.
2017-10-10 16:10:02 +02:00
Ondrej Zajicek (work) f097f7659c OSPF: Fix next hop calculation for PtP links in IPv4 OSPFv3-AF
In such case, next hop has to be taken from Link-LSA like in broadcast
case, not from neighbor source address like in other PtP cases.

Also add some checks, comments and code cleanup.
2017-10-10 16:10:02 +02:00
Ondrej Zajicek (work) d3f4f92b0e OSPF: Support of address families in OSPFv3
OSPFv3-AF can handle multiple topologies of diferent address families
(IPv4, IPv6, both unicast and multicast) using separate instances
distinguished by instance ID ranges.
2017-10-10 16:10:02 +02:00
Michal 'vorner' Vaner 7b2c5f3d28 Docs: FIB iteration macros 2017-09-19 12:59:41 +02:00
Ondrej Zajicek (work) 18ea2ea759 Doc: Document 'empty' operator
Thanks to Alexander Zubkov for the notification.
2017-09-13 13:10:50 +02:00
Ondrej Zajicek (work) f2dd602fef Backport some minor changes from int-new 2017-09-12 16:33:29 +02:00
Ondrej Zajicek (work) 9f4908fe78 Nest: VRF support for neighbor cache and olock code
Actually much simpler than expected.
2017-09-12 15:49:36 +02:00
Ondrej Zajicek (work) 943478b00f Basic VRF support
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.
2017-09-06 17:38:48 +02:00
Ondrej Zajicek (work) 98bb80a243 KRT: Fix IPv6 ECMP handling with Linux 4.11+
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
correctly.

Thanks to Vincent Bernat for the original patch.
2017-09-05 00:02:20 +02:00
Ondrej Zajicek (work) 9befc7cc4f BSD: Fix alignment issue
Incorrect structure alignment breaks kernel routing table updates on
FreeBSD/ARM (and perhaps other platforms).

Thanks to Eugene Sevastyanov for the original patch.
2017-09-04 22:32:45 +02:00
Michal 'vorner' Vaner 96eace1ea7
Merge branch 'gitlab-ci' 2017-09-04 13:30:13 +02:00
Michal 'vorner' Vaner 5c4dfe0c30
Gitlab CI support
Add configuration and docker definitions for tests and builds in Gitlab
CI platform.

Some of them currently fail, which is a known problem.
2017-09-04 11:25:51 +02:00
Ondrej Zajicek (work) 08b6a617e8 RAdv: Some style nitpicks 2017-08-30 16:34:15 +02:00