0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-10-18 09:58:43 +00:00
Commit Graph

1992 Commits

Author SHA1 Message Date
Ondrej Zajicek
4737937375 BFD: Improve 'show bfd sessions all' command 2024-03-04 23:51:37 +01:00
Katerina Kubecova
a48dc5efe0 BFD: Show session for ip / ip prefix 2024-03-04 23:35:10 +01:00
Katerina Kubecova
37bf207843 BFD: show bfd sessions all 2024-03-04 23:35:10 +01:00
Job Snijders
e2728c8078 RPKI: Add 'local address' configuration option
Allow to explicitly configure the source IP address for RPKI-To-Router
sessions. Predictable source addresses are useful for minimizing the
holes to be poked in ACLs.

Changed from 'source address' to 'local address' by committer.
2024-02-22 14:58:29 +01:00
Ondrej Zajicek
2d0652dd10 BGP: Maintain valid route attribute flags even in local tables
BGP route attributes have flags (Optional, Transitive) that are validated
on decode and set to valid value on export. But if such attribute is
modified by filter or set internally by BGP during import, then its flags
would be zero in local tables. That usually does not matter, as they are
not used locally and they were fixed on export, but invalid flags leaked
in BMP and MRT dumps.

Keep route attribute flags set to valid values even when set by filters
or modified by BGP.
2024-02-20 17:39:05 +01:00
Job Snijders
44a16bff6c BGP: Update SendHoldTimer BGP Error code
IANA registered an "Early Allocation" BGP Error code for 'Send Hold
Timer Expired' event. Update BIRD to use that error code.
2024-02-18 09:06:52 +01:00
Ondrej Zajicek
c3335b5044 Static: Allow to define both nexthop and interface
Allow to define both nexthop and interface using iproute2-like syntax,
e.g.: route 10.0.0.0/16 via 10.1.0.1 dev "eth0";

Now we can avoid to use link-local scope hack (e.g. 10.1.0.1%eth0)
for cases where both nexthop and interface have to be defined.

Thanks to Marcin Saklak for the suggestion.
2024-02-16 18:44:40 +01:00
Alexander Zubkov
574d7eb241 BGP: Allow multiple EBGP neighbors with the same peer.
We can distinguish BGP sessions if at least one side uses a different IP
address. Extend olock mechanism to handle local IP as a part of key, with
optional wildcard, so BGP sessions could local IP in the olock and not
block themselves.
2024-02-07 19:11:10 +01:00
Ondrej Zajicek
ff2ebdc7e1 BGP: Increase max length of notification data in error logs
Increase max length of notification data in error logs from 16 to 128.
There is already enough space in the buffer.

Thanks to Marco d'Itri for the suggestion.
2024-02-06 18:34:55 +01:00
Maria Matejka
3b217f2984 Fixed L3VPN after merge to v3.
Semantics of rt_get_source() has changed between v2 and v3. Also other
minor fixes were needed to make it run.
2024-01-30 23:14:10 +01:00
Maria Matejka
058984bc86 BGP: fixed MPLS setting in nexthops
bug introduced somewhere during conversion of nexthops to eattrs
2024-01-29 22:12:38 +01:00
Maria Matejka
d615633437 Merge commit '13c6cf8a7430a6b133e46525256eb5554b3f0a2b' into thread-next 2024-01-28 23:09:47 +01:00
Maria Matejka
ddb4d9a24c Merge commit 'v2.14-95-g6d453c16' into thread-next 2024-01-28 15:04:45 +01:00
Maria Matejka
8b4f53675e Merge commit 'v2.14-92-gf27b05de' into thread-next 2024-01-28 15:00:59 +01:00
Maria Matejka
6d453c16e0 Merge commit 'v2.14-38-g422f795f' into mq-merge-step-2 2024-01-28 15:00:48 +01:00
Maria Matejka
f27b05de98 Merge commit 'v2.14-36-g5fdfbf61' into mq-merge-step-2 2024-01-28 14:58:04 +01:00
Maria Matejka
b5afbe057e Merge commit 'v2.14-89-g74de3858' into thread-next 2024-01-28 14:57:52 +01:00
Maria Matejka
74de38589d Merge commit 'v2.14-34-g23025ab5' into mq-merge-step-2 2024-01-28 14:57:46 +01:00
Maria Matejka
ecbeac8582 Merge commit 'v2.14-86-g9b731089' into thread-next 2024-01-28 14:57:15 +01:00
Maria Matejka
9b731089b5 Merge commit 'v2.14-32-gcaa9460a' into mq-merge-step-2 2024-01-28 14:57:10 +01:00
Maria Matejka
4628a117d9 Merge commit 'v2.13.1-186-g761649e6' into thread-next 2024-01-28 14:38:43 +01:00
Maria Matejka
761649e66b Merge commit 'v2.13.1-141-g4f806813' into mq-merge-step-2 2024-01-28 14:29:16 +01:00
Maria Matejka
8d2ec536d9 Merge commit 'v2.13.1-183-g2b05844c' into thread-next 2024-01-28 14:28:17 +01:00
Maria Matejka
2b05844cfb Merge commit 'v2.13.1-139-gc9d1ebbd' into mq-merge-step-2 2024-01-28 14:28:09 +01:00
Maria Matejka
7a4314ee02 Merge commit 'v2.13.1-133-g7cc3d300' into mq-merge-step-2 2024-01-28 14:20:45 +01:00
Maria Matejka
6a80214fb3 BGP: fixed MPLS label stack receiving bug
Introduced in 515df18da7 while merging v2 to v3.
2024-01-28 13:16:25 +01:00
Maria Matejka
57b5eb5cbd Merge commit 'v2.13.1-162-g5bf25678' into thread-next 2024-01-27 19:01:06 +01:00
Maria Matejka
5bf2567853 Merge commit 'v2.13.1-125-g90b9e871' into mq-merge-step-2 2024-01-26 23:29:17 +01:00
Maria Matejka
365ea12ea1 MPLS Subsystem Proper Locking
Added also some debug lines if debug is on.
2024-01-26 14:42:44 +01:00
Ondrej Zajicek
13c6cf8a74 Trivial code cleanups 2024-01-22 06:29:14 +01:00
Maria Matejka
e711a991d4 MPLS: FEC Map moved from protocol to MPLS channel 2024-01-08 13:03:25 +01:00
Maria Matejka
44e351d152 RPKI: retry timer doesn't reset connections when more data is pending
With very busy deployments, RPKI may kill cache connection too early.
Instead of that, we want it to keep loading if any data is waiting to
be read and the reason for delay is just our congestion.

Also, when we kill the session because of actually slow cache, we want
to reload from scratch as the data we have is unreliable and nobody
knows whether the state is still valid.
2023-12-20 11:58:07 +01:00
Ondrej Zajicek
2b6bd8ca3a OSPF: Cleanup some warnings 2023-12-13 18:07:38 +01:00
Katerina Kubecova
bcf2327425 BGP: Send hold timer
Implement BGP Send hold timer according to draft-ietf-idr-bgp-sendholdtimer.
The Send hold timer drops the session if the neighbor is sending keepalives,
but does not receive our messages, causing the TCP connection to stall.
2023-12-05 04:14:45 +01:00
Ondrej Zajicek
3fb06fea1d BGP: Add options to require BGP capabilities
Some BGP capabilities change the BGP behavior in a significant way, so if
the configuration depends on it, it is better to not establish BGP
session when the capability is not available.

Add several BGP option to require individual BGP capabilities during
session negotiation.
2023-11-23 20:54:22 +01:00
Ondrej Zajicek
b6923f6386 BGP: Simplify capability handling 2023-11-23 17:18:04 +01:00
Maria Matejka
8558e666e0 Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-09 17:38:31 +01:00
Maria Matejka
87e2ba8c84 Merge commit '8f5511da' into mq-aggregator-for-v3 2023-11-09 16:53:45 +01:00
Maria Matejka
219dc0fdb5 Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-09 16:53:34 +01:00
Maria Matejka
f434eb3865 Merge commit 'd8130da8' into mq-aggregator-for-v3 2023-11-09 16:36:54 +01:00
Maria Matejka
5098430748 Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-09 16:00:32 +01:00
Maria Matejka
29ffc62b76 Merge commit 'e915f99e' into mq-aggregator-for-v3 2023-11-09 16:00:09 +01:00
Maria Matejka
3ccf890e58 Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-09 15:58:41 +01:00
Maria Matejka
45ffbb4d76 Merge commit '81a20ca5' into mq-aggregator-for-v3 2023-11-09 15:50:39 +01:00
Maria Matejka
00e40a6b80 Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-09 15:20:13 +01:00
Soha Jin
31aa62ae6d OSPF: On physical PtP links, skip next-hop resolving
Signed-off-by: Soha Jin <soha@jin.sh>
Co-developed-by: Wende Tan <twd2.me@gmail.com>
2023-11-09 14:33:25 +01:00
Maria Matejka
b979c6ce6e Merge commit 'bcff3ae7' into mq-aggregator-for-v3 2023-11-09 11:06:07 +01:00
Maria Matejka
515df18da7 Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-08 22:24:33 +01:00
Maria Matejka
4c07f33261 Merge commit '9d456d53' into mq-aggregator-for-v3 2023-11-08 22:14:58 +01:00
Maria Matejka
49ee823f82 Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-08 22:14:19 +01:00
Maria Matejka
cac866d5eb Merge commit '15c86ed0' into mq-aggregator-for-v3 2023-11-08 21:56:58 +01:00
Maria Matejka
c6fba7d7e6 Merge branch 'thread-next' into HEAD 2023-11-02 14:43:15 +01:00
Katerina Kubecova
9680bf68e4 Automatic ROA reloads on channel import
This includes updating OSPF, Pipe and RIP to enable partial route reload
directly from the protocols' internal tables.
2023-11-02 14:37:27 +01:00
Maria Matejka
f90f2ed680 Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-01 18:08:49 +01:00
Maria Matejka
29e3a86ad1 Merge commit '21213be5' into mq-aggregator-for-v3 2023-11-01 17:49:12 +01:00
Maria Matejka
d8463ca7d9 Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-01 17:48:00 +01:00
Maria Matejka
dd0f3940d3 Merge commit '8ad9c4bb' into mq-aggregator-for-v3 2023-11-01 17:46:52 +01:00
Maria Matejka
f32e53d7b1 Merge branch 'mq-aggregator-for-v3' into thread-next 2023-11-01 17:44:37 +01:00
Maria Matejka
5f166f6782 Aggregator: fixed route source unlocking on shutdown and withdraw 2023-11-01 17:25:29 +01:00
Maria Matejka
11faa7d36b Merge branch 'mq-aggregator-for-v3' into HEAD 2023-11-01 10:58:44 +01:00
Maria Matejka
8917f16e4b Merge branch 'mq-aggregator-for-v3' into HEAD 2023-11-01 10:58:31 +01:00
Maria Matejka
b958228953 Aggregator: Fixed bugs in filter usage 2023-11-01 10:57:43 +01:00
Maria Matejka
c103b51fca Aggregator: Expressed most of the attribute logic in filter language 2023-11-01 10:15:16 +01:00
Maria Matejka
e8dcc62ecd Merge commit 'ba91f4c831f057b81104d1453f99b012c01f9c9e' into thread-next 2023-10-31 16:54:58 +01:00
Igor Putovny
f42c118aa7 Basic route aggregation
Add a new protocol offering route aggregation.

User can specify list of route attributes in the configuration file and
run route aggregation on the export side of the pipe protocol. Routes are
sorted and for every group of equivalent routes new route is created and
exported to the routing table. It is also possible to specify filter
which will run for every route before aggregation.

Furthermore, it will be possible to set attributes of new routes
according to attributes of the aggregated routes.

This is a work in progress.

Original work by Igor Putovny, subsequent cleanups and finalization by
Maria Matejka.

This is a split-commit of the neighboring aggregator branch
with a bit improved lvalue handling, to have easier merge into v3.
2023-10-31 16:40:46 +01:00
Maria Matejka
ba91f4c831 Filters: allowing to return any number of values 2023-10-31 16:40:46 +01:00
Maria Matejka
fc3f07fdc3 Merge commit '407eb388b7082b52921e93476c8ff1a98fe3b873' into thread-next 2023-10-31 10:28:01 +01:00
Maria Matejka
407eb388b7 Filter: predefined variables for specific blocks
This is a split-commit of the neighboring aggregator branch
with a bit improved lvalue handling, to have easier merge into v3.
2023-10-30 13:10:37 +01:00
Maria Matejka
ddf698ec99 Renamed nest/rt.h back to nest/route.h
Some [redacted] (yes, myself) had a really bad idea
to rename nest/route.h to nest/rt.h while refactoring
some data structures out of it.

This led to unnecessarily complex problems with
merging updates from v2. Reverting this change
to make my life a bit easier.

At least it needed only one find-sed command:

    find -name '*.[chlY]' -type f -exec sed -i 's#nest/rt.h#nest/route.h#' '{}' +
2023-10-29 16:29:26 +01:00
Maria Matejka
c5f6dc8142 Merge commit '0a729b50' into thread-next
This merge was particularly difficult. I finally resorted to delete the
symbol scope active flag altogether and replace its usage by other
means.

Also I had to update custom route attribute registration to fit
both the scope updates in v2 and the data model in v3.
2023-10-29 15:42:46 +01:00
Maria Matejka
737807c118 Merge commit 'bb8e2824' into thread-next 2023-10-29 00:56:06 +02:00
Maria Matejka
1a49a4aea8 Merge commit 'fc9d471b' into thread-next
Conflicts:
	conf/cf-lex.l
	conf/conf.h
	filter/config.Y
	filter/data.c
	filter/data.h
2023-10-28 23:42:21 +02:00
Maria Matejka
0ba22509a8 Merge commit '51f2e7af' into thread-next
Conflicts:
	conf/cf-lex.l
	conf/conf.h
	conf/confbase.Y
	filter/config.Y
	nest/config.Y
	nest/proto.c
	nest/rt-table.c
	proto/bgp/bgp.c
	sysdep/unix/main.c
2023-10-27 18:29:31 +02:00
Maria Matejka
da52d66177 Merge commit '58efa944' into thread-next
Conflicts:
	conf/cf-lex.l
	conf/conf.h
	conf/confbase.Y
	conf/gen_keywords.m4
	conf/gen_parser.m4
	filter/config.Y
	nest/config.Y
	proto/bgp/config.Y
	proto/static/config.Y

Keywords and attributes are split to separate namespaces, to avoid
collisions between regular keyword use and attribute overlay.
2023-10-25 14:41:11 +02:00
Maria Matejka
6c85016dd4 Merge commit 'aa70e14c' into thread-next 2023-10-24 09:34:06 +02:00
Maria Matejka
7efa3bac4f Merge commit 'cce48c6c' into thread-next 2023-10-13 14:02:21 +02:00
Maria Matejka
cdb95c2858 Merge commit 'f411a19b' into thread-next 2023-10-13 13:46:04 +02:00
Maria Matejka
e7acdf6428 Merge commit 'fc354788' into thread-next 2023-10-13 11:32:53 +02:00
Maria Matejka
dabf2f5625 RIP: actually remove the interface structures on shutdown
This avoids a spurious route update fail when protocol shutdown collides
with an incoming RIP packet.
2023-10-13 11:23:29 +02:00
Maria Matejka
21b75c472d Merge commit 'e3c0eca9' into thread-next 2023-10-13 11:04:39 +02:00
Maria Matejka
b901cca2df Protocol: better granularity of pool management
There are now 3 different pools with specific lifetime. All of these are
available since protocol start, anyway they get freed in different
moments.

First, pool_up gets freed immediately after announcing PS_STOP, to e.g.
stop all timers and events regularly updating the routing table when the
imports are already flushing.

Then, pool_inloop gets freed just before the protocol loop is finally
stopped, after all channels, imports and exports and other hooks are
cleaned up.

And finally, the pool itself is freed the last. Unless you explicitly
need the early free, use this pool.
2023-10-13 10:22:09 +02:00
Maria Matejka
767b7b22a0 Merge commit '5121101136cb80151a9361c63dc4822afeb44eef' into thread-next 2023-10-12 14:12:33 +02:00
Maria Matejka
3cfa9ac253 Merge commit 'e2f08c382a2adbbbd94c5cd7d996ce9175e0fb9c' into HEAD 2023-10-12 11:38:16 +02:00
Maria Matejka
b708dd367a Merge commit '4972590e' into thread-next 2023-10-12 11:05:28 +02:00
Maria Matejka
e2f08c382a BGP/BMP: fixed build with no bmp at all 2023-10-12 10:57:55 +02:00
Maria Matejka
4972590ea5 BGP: dropped bgp_fix_attr_flags() (useless remnant from previous versions) 2023-10-12 09:29:09 +02:00
Maria Matejka
2cbf7c48ad Merge commit 'b20b6a9ad204f2648ed3d62720435bb21dfb947c' into thread-next 2023-10-11 22:26:41 +02:00
Maria Matejka
b20b6a9ad2 BGP/BMP: Moved temporary allocation checks to the freeing functions 2023-10-11 22:23:34 +02:00
Maria Matejka
65ced75e95 Merge branch 'mq-bmp-to-merge-to-v3' into thread-next 2023-10-11 22:06:18 +02:00
Ondrej Zajicek
57aa077227 BGP: Improve custom BGP attributes
- Implement EA_GET for custom BGP attributes
 - Forbid EA_SET on existing opaque attributes
 - Forbid redefining existing attributes
 - Document possible compatibility problems
2023-10-05 21:54:25 +02:00
Ondrej Zajicek
ba01a6f2e6 MPLS: Handle compatibility with old configs
Old configs do not define MPLS domains and may use a static protocol
to define static MPLS routes.

When MPLS channel is the only channel of static protocol, handle it
as a main channel. Also, define implicit MPLS domain if needed and
none is defined.
2023-10-05 17:54:43 +02:00
Ondrej Zajicek
ab47c2ae46 BGP: Custom attribute definitions should use cfg_alloc(), not malloc()
Otherwise we would get memory leaks.
2023-10-04 20:16:13 +02:00
Ondrej Zajicek
be09b030ed MPLS: Update to support and use 64bit source id 2023-10-04 15:00:24 +02:00
Ondrej Zajicek
8f5511dafb L3VPN: Import/export target reconfiguration 2023-10-04 13:12:05 +02:00
Ondrej Zajicek
d8130da86b BGP, L3VPN: Fix MPLS channel reload
When a MPLS channel is reloaded, it should reload all regular MPLS-aware
channels. This causes re-evaluation of routes in FEC map and possibly
reannouncement of MPLS routes.
2023-10-04 13:12:05 +02:00
Ondrej Zajicek
e915f99e1c L3VPN: Fix bug in reconfiguration
Fields import_target / export_target link to config structures, must be
updated during reconfiguration.
2023-10-04 13:12:05 +02:00
Ondrej Zajicek
81a20ca5d8 Static: Add syntax for static MPLS labels
Instead of just using route attributes, static routes with
static MPLS labels can be defined just by e.g.:

  route 10.1.1.0/24 mpls 100 via 10.1.2.1 mpls 200;
2023-10-04 13:12:05 +02:00
Ondrej Zajicek
bcff3ae79a L3VPN: BGP/MPLS VPNs using MPLS backbone
The L3VPN protocol implements RFC 4364 BGP/MPLS VPNs using MPLS backbone.
It works similarly to pipe. It connects IP table (one per VRF) with (global)
VPN table. Routes passed from VPN table to IP table are stripped of RD and
filtered by import targets, routes passed in the other direction are extended
with RD, MPLS labels and export targets in extended communities. A separate
MPLS channel is used to announce MPLS routes for the labels.
2023-10-04 13:07:28 +02:00
Ondrej Zajicek
9d456d5366 BGP: Add MPLS support
When MPLS is active, received routes on MPLS-aware SAFIs (ipvX-mpls,
vpnX-mpls) are automatically labeled according to active label policy and
corresponding MPLS routes are automatically generated. Also routes sent
on MPLS-aware SAFIs announce local labels when it should be done.
2023-10-04 13:01:21 +02:00
Ondrej Zajicek
15c86ed061 Static: Add MPLS support
When MPLS is active, static IP/VPN routes are automatically labeled
according to active label policy and corresponding MPLS routes are
automatically generated.
2023-10-04 13:01:21 +02:00