Commit graph

694 commits

Author SHA1 Message Date
Ondrej Zajicek (work)
d8e816c150 BSD: Fix of the previous commit 2018-06-27 17:10:01 +02:00
Ondrej Zajicek (work)
586c1800c4 Nest: Neighbor cache cleanups
Simplify neighbor cache code, fix several minor bugs, and improve
handling of ONLINK flag.
2018-06-27 16:57:07 +02:00
Maria Matejka
c2fc4c10ac Doc: renamed progdoc files Doc -> progdoc to fix collision with doc/ folder on case-insensitive filesystems 2018-06-26 17:09:12 +02:00
Jan Maria Matejka
f851f0d7e3 Config: Dropping CF_ADDTO. 2018-06-26 14:29:03 +02:00
Jan Maria Matejka
13c0be19d3 Nest: Removing separate tmpa from route propagation
This is a fundamental change of an original (1999) concept of route
processing inside BIRD. During import/export, there was a temporary
ea_list created which was to be used instead of the another one inside
the route itself.

This led to some confusion, quirks, and strange filter code that handled
extended route attributes. Dropping it now.

The protocol interface has changed in an uniform way -- the
`struct ea_list *attrs` argument has been removed from store_tmp_attrs(),
import_control(), rt_notify() and get_route_info().
2018-05-30 17:08:49 +02:00
Jan Maria Matejka
ee7e2ffd26 Protocol: Introducing an enum protocol_class
This supersedes the EAP_* constants.
2018-05-29 12:35:06 +02:00
Ondrej Zajicek (work)
eaf63d314d Better initialization of random generator
Use full time precision to initialize random generator. The old
code was prone to initialize it to the same values in specific
circumstances (boot without RTC, multiple VMs starting at once).
2018-05-03 17:07:39 +02:00
Ondrej Zajicek (work)
4841804fff NEWS and version update 2018-03-21 16:33:08 +01:00
Ondrej Zajicek (work)
be17805c0b Add support for source-specific IPv6 routes to BIRD core
This patch adds support for source-specific IPv6 routes to BIRD core.
This is based on Dean Luga's original patch, with the review comments
addressed. SADR support is added to network address parsing in confbase.Y
and to the kernel protocol on Linux.

Currently there is no way to mix source-specific and non-source-specific
routes (i.e., SADR tables cannot be connected to non-SADR tables).

Thanks to Toke Hoiland-Jorgensen for the original patch.
Minor changes by Ondrej Santiago Zajicek.
2018-02-13 16:39:07 +01:00
Ondrej Zajicek (work)
28b3b55122 KRT: Fix IPv6 route learn
Internal table used for route learn was created with non-matching net
type for IPv6 kernel proto.

Thanks to Toke Hoiland-Jorgensen for the bugreport
2018-02-06 16:08:45 +01:00
Ondrej Zajicek (work)
75d98b6013 Merge branch 'master' into int-new 2018-01-23 18:29:32 +01:00
Ondrej Zajicek (work)
d6cf996151 IO: Fix socket priority
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.
2018-01-23 17:05:45 +01:00
Ondrej Zajicek (work)
ace3072e09 KRT: Fix option 'merge paths' 2018-01-23 15:12:43 +01:00
Ondrej Zajicek (work)
e5ff7929c4 KRT: Remove useless option 2018-01-23 14:48:07 +01:00
Ondrej Zajicek (work)
b940579115 Filter: Allow silent filter execution
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.
2018-01-16 16:20:01 +01:00
Ondrej Zajicek (work)
4db4ac7243 NEWS and version update 2018-01-14 21:52:58 +01:00
Ondrej Zajicek (work)
4d36796131 KRT: Fix direct routes for BSD
Old way to set direct routes is to use local IP as gateway, but that does
not work properly on newer FreeBSDs. Now we use sockaddr_dl containing
interface index as gateway.
2018-01-14 19:21:39 +01:00
Ondrej Zajicek (work)
a63e78c31a Fix build without limited protocol set 2017-12-18 23:15:07 +01:00
Ondrej Zajicek (work)
3013fc57bd Netlink: Fix memory leak 2017-12-16 00:42:56 +01:00
Ondrej Zajicek (work)
c36a298c21 Use git describe for BIRD version
Based on patch from Pavel Tvrdik
2017-12-13 19:18:30 +01:00
Ondrej Zajicek (work)
3e7923507b Netlink: Use linpool instead of static buffer 2017-12-13 15:27:33 +01:00
Ondrej Zajicek (work)
ac48e72bf6 Fix some minor issues 2017-12-12 15:57:14 +01:00
Ondrej Zajicek (work)
66acbc8d7f Revive FIB and kernel MPLS code 2017-12-12 00:05:49 +01:00
Ondrej Zajicek (work)
d4eada9e0f NEWS and version update 2017-12-11 02:05:35 +01:00
Ondrej Zajicek (work)
c99050cce2 KRT: Fix bug in multipath handling 2017-12-11 01:04:15 +01:00
Ondrej Zajicek (work)
cf3e3845c2 Doc: Documentation update 2017-12-10 22:47:38 +01:00
Maria Jan Matejka
6b0f5f68a8 Switchoff for MPLS in kernel. 2017-12-10 18:30:00 +01:00
Ondrej Zajicek (work)
67a2eb9177 Lib: Check size of nets 2017-12-10 13:18:36 +01:00
Ondrej Zajicek (work)
517d05dff1 Enable ECMP and Link detection by default
ECMP is not enabled on BSD, where it is not supported by BIRD.
2017-12-08 16:00:33 +01:00
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)
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)
ee528fbd5d Timers: Add typecast to unit-converting macros 2017-12-07 13:53:42 +01:00
Ondrej Zajicek (work)
21f4f0f4b0 Kernel: Update to new timers 2017-12-07 13:52:21 +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
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
Ondrej Zajicek (work)
a1f5e514ef Implement onlink flag for nexthops
Add proper support for per-nexthop onlink flag in routes to handle next
hop addresses that are not covered by interface IP ranges. Supported by
kernel and static protocols.

Thanks to Vincent Bernat for the idea.
2017-07-04 23:36:21 +02:00
Ondrej Zajicek (work)
734e9fb8a9 Minor cleanups and fixes 2017-05-23 13:12:25 +02:00