0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-03-13 09:57:02 +00:00

2099 Commits

Author SHA1 Message Date
Maria Matejka
38acb415fb BFD session handling rework
The original implementation for BIRD 3 was rooted in the first
methods how I tried to go for multithreading and it had several flaws,
mostly incomprehensive notification and request pickup routines.
Also converting to a double-loop architecture where one of the
loops (low-latency) solely runs BFD socket communication, whereas
the other one does all the other shenanigans.
2025-03-10 11:18:59 +01:00
Maria Matejka
68373348b5 Proper thread group setup
Now the thread groups can be explicitly configured with their
latency and timing values.
2025-03-10 11:17:11 +01:00
Maria Matejka
4b73e9a802 Taming static checker: rt_notify never sets net_addr to zero 2025-03-10 11:17:11 +01:00
Maria Matejka
7647d5b4ef Merge commit '99c295e59' into thread-next 2025-03-10 10:51:41 +01:00
Maria Matejka
94eadc4d3a Merge commit '2679de7a3' into thread-next 2025-03-10 10:51:25 +01:00
Maria Matejka
5c288bde7d Merge commit 'deec84ca3' into thread-next 2025-03-10 10:29:44 +01:00
Maria Matejka
d821f48ea7 Merge commit '96ec6b42d' into thread-next 2025-03-10 10:27:19 +01:00
Maria Matejka
eb8ee3e95c Merge commit '6a55359b1' into thread-next 2025-03-10 10:16:50 +01:00
Ondrej Zajicek
93224ddd30 BGP: Fix reconfiguration of hostname option
The old code did not properly compare and update hostname strings,
causing BGP restarts during reconfigurations.
2025-03-06 16:09:36 +01:00
Ondrej Zajicek
2679de7a39 Nest: Fix locking of tables by channels
Channels that are down keep ptr on routing tables but do not keep them
locked. It is safe because the existence of tables depend on being
configured. But when a table is removed during reconfiguration, the
channel kept a dangling pointer since it fell down until it was removed.
This could be triggered by 'show protocols all' and other similar.

Change locking so that a channel kept a table locked for its whole
existence. The same change is already in BIRD 3.

Note that this is somewhat conceptually problematic as downed channels
do not keep resources. Also, other objects in specialized channels
(igp_table, base_table in bgp_channel, mpls_domain / mpls_range in
mpls_channel) are still locked only when channel is active, but for
them it is easier to keep track that they are not accessed when
they are deconfigured.
2025-03-06 03:43:15 +01:00
Jana Babovakova
5938adb518 Add option hostname for each protocol 2025-02-25 15:45:06 +01:00
Maria Matejka
7bc06c7672 Fixing a refeed inconsistency
On refeed, the table should not resend any obsolete routes
which have already been seen by the recipient, nor the appropriate
journal items.
2025-02-25 14:41:44 +01:00
Maria Matejka
a70a6da3e4 BGP export table src fix
When exchanging routes in BGP export table, we forgot to update
the src in cases of add path off. This led to falsely claiming another
origin of that route in export table dump and also holding protocols
in the flush state because of their srcs being kept in the export tables.
2025-02-25 14:40:46 +01:00
Ondrej Zajicek
deec84ca33 Update obsolete RFC 5575 to newer RFCs 8955 / 8956 2025-02-04 16:07:09 +01:00
Maria Matejka
d13c9d378f BGP: fix shutdown crash when dynamic peer is just connected
In some edge cases, the dynamic BGP starts but doesn't yet pick up
the socket from the peer, when it gets shut down, typically on
a complete shutdown. Fixing this to just close the socket, not assert
it being already picked up.
2025-01-13 22:15:52 +01:00
Maria Matejka
4074112992 Merge commit '85aa283071ed75059fd8c889bc4ee33be1f901af' into HEAD 2025-01-09 18:46:04 +01:00
Maria Matejka
5c3eff5645 Merge commit 'e063365590b9b857a5bd0acfa519783eba639bbf' into stable-v3.0 2025-01-09 18:40:29 +01:00
Maria Matejka
d43538acbd BGP: fixed deterministic med crashes
There were several places of forgotten NULL checks.

Thanks to Alarig Le Lay <alarig@swordarmor.fr> for reporting:
https://trubka.network.cz/pipermail/bird-users/2024-December/017990.html
2025-01-09 10:08:27 +01:00
Maria Matejka
c2bd489bbc BGP: fix display name of bgp_otc attribute 2025-01-09 10:08:27 +01:00
Maria Matejka
4f7899e3cb BGP: TX bucket storage moved to Stonehenge 2025-01-09 10:08:27 +01:00
Maria Matejka
a07f0b1e7d Static: fixed ASPA reconfiguration
Due to an oversight, the provider lists weren't compared on reconfiguration.

Reported-By: Ralph Covelli <rcovelli@he.net>
2025-01-09 01:08:59 +01:00
Ondrej Zajicek
c633cd1502 BMP: Cleanup keyword declarations 2025-01-09 00:51:25 +01:00
Ondrej Zajicek
c386369645 BFD: Fix missing keyword declarations
Some keywords were missing for BFD-only build.
2025-01-09 00:51:23 +01:00
Maria Matejka
85aa283071 Static: fixed ASPA reconfiguration
Due to an oversight, the provider lists weren't compared on reconfiguration.

Reported-By: Ralph Covelli <rcovelli@he.net>
2025-01-07 20:40:37 +01:00
Ondrej Zajicek
cf659a05a4 Lib: Data type for VPN route distinguishers
Use a distinct data structure for VPN route distinguishers instead
of just u64.
2025-01-07 20:40:17 +01:00
Fabian Bläse
de7ded6ef6 Babel: fix seqno wrapping on seqno request
The Babel seqno wraps around when reaching its maximum value (UINT16_MAX).
When comparing seqnos, this has to be taken into account. Therefore,
plain number comparisons do not work.
2025-01-07 20:38:28 +01:00
Maria Matejka
8349536278 BFD: Fix session reconfiguration locking order
The sessions have to be updated asynchronously to avoid
cross-locking between protocols.

Testsuite: cf-ibgp-bfd-switch, cf-ibgp-multi-bfd-auth
Fixes: 

Thanks to Daniel Suchy <danny@danysek.cz> for reporting:
https://trubka.network.cz/pipermail/bird-users/2024-December/017984.html
2024-12-21 19:12:54 +01:00
Maria Matejka
6779e5da69 BGP: fix locking order error on dynamic protocol spawn
We missed that the protocol spawner violates the prescribed
locking order. When the rtable level is locked, no new protocol can be
started, thus we need to:

* create the protocol from a clean mainloop context
* in protocol start hook, take the socket

Testsuite: cf-bgp-autopeer
Fixes: 

Thanks to Job Snijders <job@fastly.com> for reporting:
https://trubka.network.cz/pipermail/bird-users/2024-December/017980.html
2024-12-20 11:40:10 +01:00
Ondrej Zajicek
34b7d77e06 Lib: Data type for VPN route distinguishers
Use a distinct data structure for VPN route distinguishers instead
of just u64.
2024-12-16 18:27:42 +01:00
Katerina Kubecova
1f6ecd7e19 BGP: Print warnings when the allocated memory is larger than given acceptable maximum. 2024-12-16 12:33:07 +01:00
Maria Matejka
f2925d15fc Merge commit '1dbee120' into thread-next 2024-12-13 20:56:30 +01:00
Maria Matejka
b6f6ab0e5d Merge commit 'ef456118' into thread-next 2024-12-13 16:01:19 +01:00
Maria Matejka
731593685b Merge commit 'd85fa48e' into thread-next
The resource dumping routines needed to be updated in v3 to use the new
API introduced in v2.

Conflicts:
	filter/f-util.c
	filter/filter.c
	lib/birdlib.h
	lib/event.c
	lib/mempool.c
	lib/resource.c
	lib/resource.h
	lib/slab.c
	lib/timer.c
	nest/config.Y
	nest/iface.c
	nest/iface.h
	nest/locks.c
	nest/neighbor.c
	nest/proto.c
	nest/route.h
	nest/rt-attr.c
	nest/rt-table.c
	proto/bfd/bfd.c
	proto/bmp/bmp.c
	sysdep/unix/io.c
	sysdep/unix/krt.c
	sysdep/unix/main.c
	sysdep/unix/unix.h
2024-12-13 15:58:10 +01:00
Maria Matejka
a9c1966f08 Merge remote-tracking branch 'origin/apkg-v3' into thread-next 2024-12-12 21:07:53 +01:00
Maria Matejka
6e940c259d CLI: show threads all crash fixed
When socket dropped before finished, it failed to cleanup.
2024-12-12 15:00:26 +01:00
Maria Matejka
1f8eb20710 Merge commit '946386f2' into thread-next 2024-12-10 23:55:05 +01:00
Maria Matejka
cc0c8ce992 BMP: Fixing corner cases
Protocol state propagation collision, shutdown collision.
2024-12-10 23:41:48 +01:00
Maria Matejka
cde582977f BMP: Never touching the BGP directly
Dropped hopefully last remnants of BMP directly accessing BGP structures.
2024-12-10 23:41:48 +01:00
Maria Matejka
dc692ae06a Nest: proto/channel state table naming convention cleanup 2024-12-10 23:41:48 +01:00
Fabian Bläse
cfac0076fb Babel: fix seqno wrapping on seqno request
The Babel seqno wraps around when reaching its maximum value (UINT16_MAX).
When comparing seqnos, this has to be taken into account. Therefore,
plain number comparisons do not work.
2024-12-10 02:14:06 +01:00
Jakub Ružička
eaadf3af3a Fix typos found by lintian
I: bird3: spelling-error-in-binary "an other" "another" [usr/sbin/bird]
I: bird3: spelling-error-in-binary Reseting Resetting [usr/sbin/bird]
I: bird3: spelling-error-in-binary authenication authentication [usr/sbin/bird]

I was unable to fix the following:

I: bird3: spelling-error-in-binary upto up to [usr/sbin/bird]
2024-12-06 16:09:31 +01:00
Ondrej Zajicek
6a55359b1e BGP: Graceful restart timer overrides
Implement several options (min/max graceful restart time, min/max long
lived stale time) to override graceful restart and long-lived graceful
restart timer values, as suggested by RFC 9494.
2024-12-06 04:06:16 +01:00
Ondrej Zajicek
fc5d06c28d BGP: Update LLGR draft references to RFC 9494 2024-12-05 16:42:49 +01:00
Maria Matejka
77a4b21365 BMP: Dropped remnants of unused channels 2024-12-05 15:10:15 +01:00
Maria Matejka
f1a04ce190 BMP: refactored lists and table locks to tlists 2024-12-05 14:59:54 +01:00
Maria Matejka
d5f01efbe6 BMP: protocol state ingestion refactoring 2024-12-05 12:12:34 +01:00
Maria Matejka
2128c648e0 BMP: Tamed a TX buffer warning 2024-12-04 10:16:42 +01:00
Ondrej Zajicek
63221eba2e Merge commit 'a47704a53db4f088e52e43f8b24785e5777ce147' into thread-next 2024-12-03 19:40:21 +01:00
Ondrej Zajicek
723a0fe424 Merge commit '73e7d3f5cede2e72eb9e77d61424a8c443672c09' into thread-next 2024-12-03 19:00:05 +01:00
Ondrej Zajicek
abc43c097a Merge commit '5205ff97448cc34cf7334e90172c28eb48f227f2' into thread-next 2024-12-03 18:48:20 +01:00