0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-23 10:11:53 +00:00
Commit Graph

3719 Commits

Author SHA1 Message Date
Maria Matejka
a9d468c590 Preexport: No route modification, no linpool needed 2021-03-20 23:53:59 +01:00
Maria Matejka
415d6e299c Route: moved rte_src pointer from rta to rte
It is an auxiliary key in the routing table, not a route attribute.
2021-03-20 23:53:56 +01:00
Maria Matejka
7d67c21b12 Route export: Inlined do_rt_notify() as the split is now for nothing. 2021-03-20 23:52:31 +01:00
Maria Matejka
3357e0a199 Route export: More elegant export dispatcher.
Also:
* Feeding request by net.
* Passing only net_addr in export structure.
* Cleanup of krt_replace_rte() call.
2021-03-20 23:45:32 +01:00
Maria Matejka
7930c03a23 Route export: rejected by filter bitmap
If a route has been rejected by filter, store that information
to avoid repeated export filter runs on rejected routes.
2021-03-20 23:24:12 +01:00
Maria Matejka
d53623f120 Route export: dropped tail-execution of do_rt_notify() 2021-03-20 23:24:12 +01:00
Maria Matejka
05336bb615 Route export: passing the export state in a dedicated structure 2021-03-20 23:24:12 +01:00
Maria Matejka
45475df1bc Internal API change: passing all the rt_notify() data as a single structure. 2021-03-20 23:24:12 +01:00
Maria Matejka
1cddde9fa6 Export table: Fixed segfault on withdraw.
This happens only if the channel really uses the old route.
2021-03-20 23:24:12 +01:00
Maria Matejka
f604915200 KRT: Using obligatory export table when non-trivial filters are applied.
When the kernel filter is anything more sophisticated than FILTER_ACCEPT
or FILTER_REJECT, we should ensure that the old route being sent to the
kernel protocol is really what was sent there before. This fixes the old
misbehavior when an unfiltered old route was used.
2021-03-20 23:24:12 +01:00
Maria Matejka
6cbeefc2ac Cleaning up also the rte_same hook which is never set 2021-03-20 23:24:12 +01:00
Maria Matejka
f2918e20ea Dropping rte-local dumper entries 2021-03-20 23:24:12 +01:00
Maria Matejka
5ceaec93f7 Dropping the tmp_attrs mechanism as obsolete
There are no protocol-specific fields in rte now.
2021-03-20 23:24:12 +01:00
Maria Matejka
c32410fb40 Kernel: Convert the rte-local attributes to extended attributes and flags to pflags 2021-03-20 23:24:12 +01:00
Maria Matejka
1a52c2ffff Dropping the RTS_DUMMY temporary route storage.
Kernel route sync is done by other ways now and this code is not used
currently.
2021-03-20 23:24:12 +01:00
Maria Matejka
3eca940c22 Babel: Convert the rte-local attributes to extended attributes 2021-03-20 23:24:10 +01:00
Maria Matejka
3a7ee2c90d OSPF: Convert the rte-local attributes to extended attributes 2021-03-20 23:22:47 +01:00
Maria Matejka
984ba01589 RIP: Convert the rte-local attributes to extended attributes 2021-03-20 23:21:25 +01:00
Maria Matejka
9d0dec40f8 IGP metric getter refactoring to switch 2021-03-20 23:18:34 +01:00
Maria Matejka
a67064a494 Allow a generic pointer in route extended attributes 2021-03-20 20:54:10 +01:00
Maria Matejka
dd18eef5ac BGP: Moved the suppressed and stale flags to pflags 2021-03-20 20:52:13 +01:00
Maria Matejka
cda7a1936d Preference moved to RTA and set explicitly in protocols 2021-03-20 20:51:53 +01:00
Maria Matejka
aac08f12a7 Route import API redefinition.
Hidden rte_get_temp() into rte_update().
Split rte_update() / rte_withdraw().
2021-03-20 20:41:41 +01:00
Maria Matejka
b8b900e803 Filter: Additional consistency checks 2021-03-20 20:36:19 +01:00
Ondrej Zajicek (work)
82f19ba95e NEWS and version update 2021-03-18 20:18:38 +01:00
Ondrej Zajicek (work)
f1ffe6a231 Add new BGP tests 2021-03-18 15:54:44 +01:00
Ondrej Zajicek (work)
5a6e8380f8 BGP: Do not show statistics
BGP statistics code was preliminary and i wanted to replace it by
separate 'show X stats' command. The patch hides the preliminary
output in 'show protocols all' so it is not part of the released
version.
2021-03-18 15:44:04 +01:00
Ondrej Zajicek (work)
454ae30445 RPKI: Improve error handling of DNS resolver 2021-03-17 17:24:00 +01:00
Ondrej Zajicek (work)
0a3db4c680 Minor fixes for restricted builds 2021-03-17 15:56:12 +01:00
Ondrej Zajicek (work)
2f98153490 Pipe: Propagate debug flags from protocol to channels
Pipe channels are kind-of implicit, so setting protocol debug flags
should also set pipe debug flags.
2021-03-16 20:10:00 +01:00
Ondrej Zajicek (work)
ae9ae864d3 OSPFv3: Update neighbor authentication state from Hello packets
In OSPFv3, only Hello and DBDes packets contain flags specifying whether
RFC 7166 authentication trailer is used. Other packets are processed
based on stored authentication state in neighbor structure. Update this
state with each received Hello to handle authentication change from
reconfigurations.

Thanks to Joakim Tjernlund and Kenth Eriksson for the bugreport.
2021-03-16 16:34:42 +01:00
Ondrej Zajicek (work)
94abefc00b Filter: Update 'gw' to handle IPv6 link-local addresses
When a link-local address is set, use the existing iface for scope.

Thanks to Marcel Krüger for the bugreport.
2021-03-15 18:37:18 +01:00
Ondrej Zajicek (work)
0d1a11cca3 Doc: Document automatic RPKI reload 2021-03-15 17:51:33 +01:00
Ondrej Zajicek (work)
6489a2450e Doc: Document channel debug options 2021-03-15 16:16:32 +01:00
Ondrej Zajicek (work)
7be3af7fa6 Rate-limit scheduling of work-events
In general, events are code handling some some condition, which is
scheduled when such condition happened and executed independently from
I/O loop. Work-events are a subgroup of events that are scheduled
repeatedly until some (often significant) work is done (e.g. feeding
routes to protocol). All scheduled events are executed during each
I/O loop iteration.

Separate work-events from regular events to a separate queue and
rate limit their execution to a fixed number per I/O loop iteration.
That should prevent excess latency when many work-events are
scheduled at one time (e.g. simultaneous reload of many BGP sessions).
2021-03-12 15:35:56 +01:00
Ondrej Zajicek (work)
9cf3d53311 Static: Implement reload hook 2021-03-10 15:07:19 +01:00
Ondrej Zajicek (work)
211fe69c98 Nest: No automatic ROA reload on non-reloadable channels 2021-03-09 18:37:52 +01:00
Ondrej Zajicek (work)
d3782c72b9 Nest: Add option to control automatic RPKI reload
Also, no automatic reload for BGP channels without import/export table.
2021-02-12 05:05:18 +01:00
Ondrej Zajicek (work)
77ce849ecf Tests: Add missing mockup function to tests 2021-02-10 17:29:14 +01:00
Vincent Bernat
714238716e BGP: Add support for BGP hostname capability
This is an implementation of draft-walton-bgp-hostname-capability-02.
It is implemented since quite some time for FRR and in datacenter, this
gives a nice output to avoid using IP addresses.

It is disabled by default. The hostname is retrieved from uname(2) and
can be overriden with "hostname" option. The domain name is never set
nor displayed.

Minor changes by committer.
2021-02-10 16:53:57 +01:00
Ondrej Zajicek (work)
00b85905b9 Nest: Automatic channel reloads based on RPKI changes
If there are roa_check() calls in channel filters, then the channel
subscribes to ROA table notifications, which are sent when ROA tables
are updated (subject to settle time) and trigger channel reload or
refeed.
2021-02-10 03:09:57 +01:00
Ondrej Zajicek (work)
d06a875b04 Filter: Recursive filter iteration code
Add macros for recursive filter iteration that allows to examine
all instructions reachable from a filter.
2021-02-07 19:21:42 +01:00
Ondrej Zajicek (work)
5d414309ec MRT: Fix MP-BGP next hops
Flag signalling that MP-BGP mode should be used got reset after first
batch of routes, so remaining routes were processed without that, leading
to missing MP_REACH_NLRI attribute.

Thanks to Piotr Wydrych for the bugreport.
2021-01-22 04:34:15 +01:00
Ondrej Zajicek (work)
df83f62697 Netlink: Ignore dead routes
With net.ipv4.conf.XXX.ignore_routes_with_linkdown sysctl, a user can
ensure the kernel does not use a route whose target interface is down.
Such route is marked with a 'dead' / RTNH_F_DEAD flag.

Ignore these routes or multipath nexthops during scan.

Thanks to Vincent Bernat for the original patch.
2021-01-14 02:01:07 +01:00
Ondrej Zajicek (work)
a40ddf5c61 Build: Fix tags generation 2021-01-12 15:43:54 +01:00
Ondrej Zajicek (work)
d774f6d721 MRT: Fix IPv6 table dumps
Add fake MP_REACH_NLRI attribute with BGP next hop when encoding MRT
table dumps for IPv6 routes. That is necessary to encode next hop as
NEXT_HOP attribute is not used for MP-BGP.

Thanks to Santiago Aggio for the bugreport.
2021-01-12 15:37:01 +01:00
Ondrej Zajicek (work)
910adaa08b BFD: Dispatch sessions also by interface index
Direct BFD sessions needs to be dispatched not only by IP addresses, but
also by interfaces, in order to avoid collisions between neighbors with
the same IPv6 link-local addresses.

Extend BFD session hash_ip key by interface index to handle that. Use 0
for multihop sessions.

Thanks to Sebastian Hahn for the original patch.
2021-01-10 15:29:02 +01:00
Ondrej Zajicek (work)
17663b6a7c RPKI: Remove port (and SSH username) from 'Cache server' output line
It was mixed-up if hostname is IPv6 address, and reporting separate
values (like port) on separate lines fits better into key-value style
of 'show protocols all' output. Also, the patch simplifies transport
identification formatting (although it is unused now).

Thanks to Alarig Le Lay for the suggestion.
2021-01-07 06:04:31 +01:00
Ondrej Zajicek (work)
2a8cc7259e Kernel: Do not check templates
So one can define kernel protocol template without channels.
For other protocols, it is either irrelevant or already done.

Thanks to Clemens Schrimpe for the bugreport.
2021-01-07 01:56:00 +01:00
Ondrej Zajicek (work)
a141959f07 Doc: Describe per-nexthop static route options
Also remove description of (no longer supported) per-route 'bfd' option,
and add examples of IPv6 routes with link-local nexthops.
2021-01-07 01:20:56 +01:00