0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00
Commit Graph

5274 Commits

Author SHA1 Message Date
Ondrej Zajicek
9eca3e1a2e Nest: Cleanup timeformat grammar 2024-11-07 15:08:51 +01:00
Maria Matejka
38195ac628 ASPA: fixed the check algorithm to actually do what is in the RFC
The original algorithm assumed principles not consistent with the RFC
and could have lead to false invalids.

Also added filter tests showing also how the ASPA literals are used in
the static protocol.
2024-11-07 15:08:14 +01:00
Ondrej Zajicek
c7e843c1a7 BGP: Add RFC 9687 to list of supported RFCs 2024-11-07 15:07:22 +01:00
Maria Matejka
b4196b70c4 BGP: SendHoldTimer became an RFC, updating docs 2024-11-06 13:05:32 +01:00
Ondrej Zajicek
294d363da0 Filter: Remove T_ENUM_RTC
It is not used for a long time.
2024-10-18 16:53:12 +02:00
Ondrej Zajicek
1002c35bf9 Filter: Replace T_ENUM_NETTYPE with T_ENUM_NET_TYPE
To be consistent with other enum type names.
2024-10-18 16:49:19 +02:00
Ondrej Zajicek
80ca0ed279 Filter: Add enum types to filter grammar
Enum types existed on semantic level, but not on syntactic level,
so they could not be used in filter code.

Generate filter grammar for enum types based on CF_ENUM() declarations.

Thanks to lbz for the bugreport.
2024-10-18 16:39:42 +02:00
Eric Long
072821e55e Flowspec: Fix IPv6 prefix when offset is not multiple of 8
Current implementation handles flowspec prefix length and offset only
in bytes, but RFC 8956 (Dissemination of Flow Specification Rules for
IPv6) Section 3.1 [1] and example in Section 3.8.2 [2] states the
pattern should begin right after offset *bits*.

For example, pattern "::1:1234:5678:9800:0/60-104" is currently
serialized as "02 68 3c 01 12 34 56 78 98", but it should shift its
pattern 4 more bits to the left: "02 68 3c 11 23 45 67 89 80".

This patch implements shifting left/right for IPv6 type and use it to
correct the behaviour. Test data are replaced with the correct ones.

Minor changes and test vectors done by committer.

[1]: https://www.rfc-editor.org/rfc/rfc8956.html#section-3.1
[2]: https://www.rfc-editor.org/rfc/rfc8956.html#section-3.8.2
2024-10-16 21:32:36 +02:00
Ondrej Zajicek
6f9ccfae9e Flowspec: Test improvements
Simplify Flowspec initialization macros.

Add examples from RFC 8955 4.3 and RFC 8956 3.8 to format tests.
2024-10-16 04:04:46 +02:00
Ondrej Zajicek
a70ecadefe Doc: Minor fixes 2024-10-15 17:19:42 +02:00
Ondrej Zajicek
cb40a666b9 Doc: Fix code blocks
Code blocks should not be indented, as the indendation is passed
to the output,
2024-10-15 17:17:10 +02:00
Johannes Erwerle
72c2df562d Doc: Improve readability of the operator documentation
Minor changes by committer.
2024-10-15 17:17:06 +02:00
Maria Matejka
02de88de41 Table: tame warnings around unused debug messages 2024-10-11 12:23:52 +02:00
Ondrej Zajicek
48a620a916 Fix typo in documentation 2024-10-09 18:00:16 +02:00
Ondrej Zajicek
39e75b879b Filter: Fixes and improvements related to case/sets
Unify grammar for set_atom and switch_atom to avoid inconsistencies
between them. Fix errors in documentation related to case statement
and set type. Change 'vpnrd' to 'rd' to be consistent with the filter
language.

Thanks to Mikhail Mayorov for bugreport.
2024-10-08 19:44:17 +02:00
Ondřej Zajíček
163ab3130f Merge branch 'dpetera-master-patch-71179' into 'master'
Fix typo in user docs

See merge request labs/bird!27
2024-10-07 16:35:55 +02:00
David Petera
d4929d9113 Fix typo in user docs 2024-10-07 16:15:09 +02:00
Job Snijders
8dc2a36ae5 RPKI: Add TCP-MD5 authentication option
RPKI-To-Router (RTR) sessions seem to be similar security-sensitivity as
IBGP sessions. BIRD already offered a choice of either "plain TCP" (meh)
or "SSH" (secure, albeit a bit more hassle to set up than TCP-MD5).
The patch adds TCP-MD5 as another option. TCP-MD5 for RTR is specified
through RFC 6810 section 7.3 and RFC 8210 section 9.3.

Minor changes by committer.
2024-10-03 16:25:29 +02:00
Katerina Kubecova
716472957b Kernel: protocol shuts down synchronously
Before this commit, on kernel shutdown, the routes were re-exported by
the regular export but treated as withdraw. This was too hairy and
caused unnecessary complexity of the protocol's state machine.

Instead of that, we found out that it makes more sense to just refeed
the routes synchronously and convert to withdraw. This is done by the
direct export access instead of the channel.

It would (maybe) make more sense to run export filters on this in case
the export filter updates the krt_metric attribute, but as this doesn't
work on regular withdraw anyway, it's better for now to just let it be
and maybe somebody in the future fixes this issue.
2024-09-30 10:04:36 +02:00
Maria Matejka
5daec239c4 Renamed my past self in commit authorship and mentioned that in the contributing policy 2024-08-29 14:38:58 +02:00
Maria Matejka
2ba6e797cc Fixed a stupid bug in parse-and-exit mode
Introduced in 08ff0af898, the additional CLI
configuration wasn't properly initialized in the parse-and-exit mode
due to an oversight that cli_init_unix() is not called in this mode.

Thanks to Felix Friedlander for the bugreport.
2024-08-29 14:37:19 +02:00
Fabrice Fontaine
404e82616d configure.ac: properly evaluate ac_test_CFLAGS
Since autoconf 2.69 and
https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=76754e04fce5f6a7701bec57b057020585df2ae3
ac_test_CFLAGS is set to ${CFLAGS+y} instead of ${CFLAGS+set}.

Just test that ac_test_CFLAGS is not empty, to support both cases.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2024-08-27 14:54:07 +02:00
Ondrej Zajicek
acbdc29d57 Lib: Expand timer recurrence to 64b
The period of recurent timers was stored in 32b field, despite it was
btime-compatible value in us. Therefore, it was limited to ~72 min,
which mas okay for most purposes, except configurable MRT dump periods.

Thanks to Felix Friedlander for the bugreport.
2024-08-27 14:28:41 +02:00
Ondrej Zajicek
5214d7e59f IO: Ensure that socket rcvbuf is large enough
The socket structure has the field rbsize (receive buffer size), which
controls the size of the userspace receive buffer. There is also kernel
receive buffer, which in some cases may be smaller (e.g. on FreeBSD it
is by default ~8k). The patch ensures that the kernel receive buffer is
as large as the userspace receive buffer.
2024-08-01 14:55:05 +02:00
Ondrej Zajicek
c9836207f5 IO: Fix missing return introduced in one of earlier patches 2024-07-30 16:42:32 +02:00
Ondrej Zajicek
df22b3140c IO: Avoid re-binding accepted sockets to VRF
When VRFs are used, BIRD correctly binds listening (and connecting)
sockets to their VRFs but also re-binds accepted sockets to the same VRF.
This is not needed as the interface bind is inherited in this case, and
indeed this redundant bind causes an -EPERM if BIRD is running as
non-root making BIRD close the connection and reject the peer.

Thanks to Christian Svensson for the original patch and Alexander Zubkov
for suggestions.
2024-07-30 16:33:51 +02:00
Maria Matejka
e787a9210f NEWS and version update 2024-07-01 15:34:06 +02:00
Maria Matejka
5ea6423cb9 Fixed secondary route export 2024-06-28 22:03:45 +02:00
Maria Matejka
d53582c9a1 show threads: displaying the same thread id's as in log 2024-06-28 22:03:45 +02:00
Maria Matejka
c2480ff533 Export: Throw a warning instead of crashing on export_accepted_map inconsistency 2024-06-28 22:03:45 +02:00
Maria Matejka
edffd82057 Config undo queuing bug fixed 2024-06-28 22:03:45 +02:00
Maria Matejka
45fb9742f0 BGP runs TX as a deferred routine
This should help flushing the tx buffers as soon as possible.
2024-06-28 22:03:45 +02:00
Maria Matejka
6eea722d3f Forbid locking altogether when RCU reader is active 2024-06-28 22:03:45 +02:00
Maria Matejka
1e77e6e1b2 Flush deferred calls directly after the loop finished its one run 2024-06-28 22:03:45 +02:00
Maria Matejka
865bab6237 IO: Allow to take new loops if the thread is hot, but only one at time 2024-06-28 22:03:45 +02:00
Maria Matejka
18d069d663 Even on shutdown we should try to pass the freed memory to others 2024-06-27 08:22:15 +02:00
Maria Matejka
08ff0af898 Additional CLI sockets may now be restricted
This allows to have one main socket for the heavy operations
very restricted just for the appropriate users, whereas the
looking glass socket may be more open.

Implemented an idea originally submitted and requested by Akamai.
2024-06-27 04:14:39 +02:00
Maria Matejka
f3b6661ddd Additional CLI sockets can be now configured in the config file
If the user has such a need, they may configure additional sockets
in the config file. This may work for e.g. some advanced access control.
2024-06-27 04:14:38 +02:00
Maria Matejka
a95fff3793 CLI now has a configuration structure 2024-06-27 04:14:38 +02:00
Maria Matejka
09f50f3766 Typed lists: added forgotten #undef 2024-06-27 04:14:38 +02:00
Maria Matejka
f27004fb4d Backported typed list updates from v3
Source: dda37842dc
2024-06-27 04:14:38 +02:00
Maria Matejka
af73cc4215 Allocator now reports cold pages 2024-06-26 20:45:54 +02:00
Maria Matejka
aa11e82174 Filter unit test uncertainty hack 2024-06-26 18:30:17 +02:00
Maria Matejka
be2ba84e50 Tame improper xmalloc warning 2024-06-26 17:21:26 +02:00
Maria Matejka
b797444e94 Merge commit 'b95dc8f29f18eb177f91fdc4bf0716fac9b15366' into mq-config-ref
Also converted all _Bool's to bool.
2024-06-26 17:19:24 +02:00
Ondrej Zajicek
333c7e8536 Doc: Minor cleanups in BFD documentation 2024-06-26 16:38:03 +02:00
Alexander Zubkov
8a40bccffe BFD: Add option to accept zero checksum for IPv6 UDP packets
Some vendors do not fill the checksum for IPv6 UDP packets.
For interoperability with such implementations one can set
UDP_NO_CHECK6_RX socket option on Linux.

Thanks to Ville O for the suggestion.

Minor changes by committer.
2024-06-26 16:29:57 +02:00
Maria Matejka
16e53f3f30 channel roa reload debug message 2024-06-26 15:13:12 +02:00
Maria Matejka
2a6fe617b1 IO: allow for faster loop dropping 2024-06-26 11:30:48 +02:00
Maria Matejka
a4a7e09478 Revert "BGP: Export uses common attribute cache"
This reverts commit d01a7c2bda.

It seems that the performance penalty in global ea cache is actually
very high so returning back to local attribute caches in every BGP.
2024-06-26 11:30:48 +02:00