Commit graph

3685 commits

Author SHA1 Message Date
Kenth Eriksson 71e08edd94 Doc: Add 'ptp address' to OSPF doc overview 2020-06-03 23:05:29 +02:00
Ondrej Zajicek (work) 63451c1961 Test: Fix unit test mockups 2020-06-03 16:15:29 +02:00
Kazuki Yamaguchi f1b5f179db Netlink: Fix parsing of MPLS multipath routes
Add support for RTA_MULTIPATH attribute parsing for AF_MPLS routes.

BIRD is capable of installing a multipath route into kernel on Linux,
but it would not be seen because parsing fails. This made BIRD attempt
to install the same route repeatedly.

(The patch minorly updated by committer)
2020-06-03 15:18:02 +02:00
Kazuki Yamaguchi 19f8f17320 RPKI: Fix unnecessary reconnection on reconfiguration
Compare the new timing parameters with the old configuration, not with
the temporary state of the current connection.

The timing values in struct rpki_cache is updated by a version 1 End Of
Data PDU, unless this behavior is suppressed by the configuration
explicitly by the "keep" keyword. Consequently, every reconfiguration
of BIRD triggers a reconnection even if it is not necessary.
2020-06-03 15:05:35 +02:00
Ondrej Zajicek (work) fae5448134 Log: Do not open logfiles when parse-and-exit option is active
This is a quick workaround for an issue where configured logfiles are
opened/created during parsing of a config file even when parse-and-exit
option is active. We should later refactor the logging code to avoid
opening log during parsing altogether.
2020-06-03 14:59:20 +02:00
Maria Matejka eee8af4db2 OSPF: setting list node to zero before enlisting 2020-06-02 16:58:06 +02:00
Ondrej Zajicek (work) 4e8f8afc68 Babel: Set onlink flag for IPv4 routes with unreachable next hop
If the next hop of a route is not a reachable address, the route should be
installed as onlink. This enables a configuration common in mesh networks
where the mesh interface is assigned a /32 and babel handles the routing by
installing onlink routes.

Thanks to Toke Hoiland-Jorgensen for the patch.
2020-05-26 23:43:13 +02:00
Ondrej Zajicek (work) c1632ad0f3 OSPF: Fix handling of unnumbered PtPs
This issue has a long history. In 2012, we changed data field for
unnumbered PtP links from iface id (specified by RFC) to IP address based
on reports of bugs in Quagga that required it, and we used out-of-band
information to distinquish unnumberred PtPs with the same local IP
address.

Then with OSPF graceful restart implementation, we found that we can no
longer use out-of-band information, and we need to use only LSAdb info
for routing table calculation, but i forgot to finish handling of this
case, so multiple unnumbered PtPs with the same local IP addresses were
broken.

Considering that even recent Mikrotik RouterOS has broken next hop
calculation that depends on IP address in PtP link data field, we
cannot just switch back to the iface id for unnumbered PtP links.

The patch makes two changes: First, it goes back to use out-of-band
(position) info for distinguishing local interfaces in SPF when graceful
restart is not enabled, while still uses LSAdb-only approach for SPF
calculation when graceful restart is enabled.

Second, it adds OSPF interface option 'ptp address', which controls
whether IP address or iface id is used in data field. It is enabled
by default except for unnumbered PtP links with enabled graceful
restart.

Thanks to Kenth Eriksson for the bugreport and Joakim Tjernlund for
suggestions.
2020-05-26 18:21:43 +02:00
Ondrej Zajicek (work) 1ca7665fa4 Nest: Allow key id 0
There is nothing in RFCs specifying that id 0 is not allowed. Some
implementations does not support it, while some other use key id 0 by
default. We allow it but start with key id 1 by default.

Thanks to Kenth Eriksson for the bugreport.
2020-05-19 02:50:47 +02:00
Ondrej Zajicek (work) b729e731f9 RIP: Triggered RIP (demand circuit) documentation 2020-05-19 02:42:22 +02:00
Ondrej Zajicek (work) ec430a7fee Nest: Implement BGP path mask loop operator
Implement regex-like '+' operator in BGP path masks to match previous
path mask item multiple times. This is useful as ASNs may appear
multiple times in paths due to path prepending for traffic engineering
purposes.
2020-05-18 16:25:08 +02:00
Ondrej Zajicek (work) 5fc8407177 RIP: Fix handling of passive mode for demand circuit interfaces 2020-05-12 03:46:47 +02:00
Ondrej Zajicek (work) b8bbbbaf56 Nest: Fix neighbor handling for colliding ranges
Resolve neighbors using longest prefix match. Although interface ranges
should not generally collide, it may happen for unnumbered links.

Thanks to Kenth Eriksson for the bugreport.
2020-05-11 04:29:36 +02:00
Ondrej Zajicek (work) f7c34aa227 Tests: Activate BGP-int test 2020-05-05 02:20:30 +02:00
Matous Holinka e6785c469b Tests: Change unsupported Ubuntu 19.04 for supported version 19.10 2020-05-05 02:16:28 +02:00
Ondrej Zajicek (work) 82bfee76f0 Filter: Remove quitbird command
No need for this debug filter command and it can be abused from CLI.
2020-05-02 02:47:18 +02:00
Maria Matejka b12442c985 Fixed a harmless warning in production build 2020-05-01 15:41:42 +02:00
Maria Matejka 048eb2ddf1 Merge remote-tracking branch 'origin/mq-static-analysis' 2020-05-01 15:34:17 +02:00
Maria Matejka 59238768b3 Slab: Init node in slab head to NULLs. 2020-05-01 15:19:12 +02:00
Maria Matejka ea259d6201 Timer: Adding missing initializer. 2020-05-01 15:19:12 +02:00
Maria Matejka 0c3b8ffe25 Lexer: strtoul shall never set endptr to NULL; it should be an error 2020-05-01 15:19:12 +02:00
Maria Matejka cdde3550dc Unix socket: Path length check directly before copying the path.
This is not needed as the string is always short enough, anyway
it may be needed in future and one strlen during BIRD start is
cheap enough.
2020-05-01 15:19:12 +02:00
Maria Matejka 9ac13d7af2 Lists: Replaced replace_node() by update_node() which is the only use of that function. 2020-05-01 15:19:12 +02:00
Maria Matejka e26a5195dd Lists: fix a stupid sanitizer bug 2020-05-01 15:19:12 +02:00
Maria Matejka 3bb10b4d31 Uninitialized list nodes fixes 2020-05-01 15:19:12 +02:00
Maria Matejka 258be56539 Nest: Added const to ea_show just to declare that this shouldn't really change anything 2020-05-01 15:19:12 +02:00
Maria Matejka a7d9b8f116 OSPF: Zero-initialization of a temporary neighbor 2020-05-01 15:19:12 +02:00
Maria Matejka 0fa8bf91cd Nest: Several assumptions to tame the static analyzer 2020-05-01 15:19:12 +02:00
Maria Matejka bbe49ae569 Nest: Assumption in rt-show for not-so-intuitive invariant. 2020-05-01 15:19:12 +02:00
Maria Matejka a08853a269 Static scanner and expensive debugging setup fix 2020-05-01 15:19:12 +02:00
Maria Matejka 5f60d14ede RPKI: fixed rare va_list leak 2020-05-01 15:19:12 +02:00
Maria Matejka b748220906 Static check: Don't report dead code 2020-05-01 15:19:12 +02:00
Maria Matejka 9e64ac4b7c OSPF: Adding a note about a static analyzer result. 2020-05-01 15:19:12 +02:00
Maria Matejka dccee40826 OSPF: variable-length array of size 0 replaced by alloca()'d pointer
NULL pointer is safer than a random pointer onto stack if this function
gets changed and eventually broken.
2020-05-01 15:19:12 +02:00
Maria Matejka baac700906 List expensive check. 2020-05-01 15:19:12 +02:00
Maria Matejka a0d0a71a18 Expensive check declaration
Intended to be run at every operation with complex data structures
to check their consistency and validity.
2020-05-01 15:19:12 +02:00
Maria Matejka a1b61a271a IPv6 address parser: fail on incomplete addresses 2020-05-01 15:19:12 +02:00
Maria Matejka d65a926a67 Filter: Don't alloc varargs array if its length would be zero 2020-05-01 15:19:12 +02:00
Maria Matejka 30ba7c1661 Filter: Removed forgotten dead code 2020-05-01 15:19:12 +02:00
Maria Matejka bf9486bf20 Non-null function argument declaration 2020-05-01 15:18:48 +02:00
Ondrej Zajicek (work) 17de3a023f BGP: Fix handling of strange IPv6 link-local-only next hops
There are three common ways how to encode IPv6 link-local-only next hops:
(:: ll), (ll), and (ll ll). We use the first one but we should accept all
three. The patch fixes handling of the last one.

Thanks to Sebastian Hahn for the bugreport.
2020-04-29 02:50:29 +02:00
Maria Matejka 8029ae527e More assertion categories 2020-04-28 16:21:06 +02:00
Maria Matejka d607205486 Not calling memcpy with n=0. 2020-04-28 16:21:06 +02:00
Maria Matejka 124d860f64 Filter: fixed omitted overflow check in EC constructor 2020-04-28 16:21:06 +02:00
Maria Matejka 59a86cbc7c Makefile rule for static analyzer 2020-04-28 16:21:06 +02:00
Ondrej Zajicek (work) b465604eb1 Tests: Activate BGP-auth test 2020-04-28 15:26:26 +02:00
Ondrej Zajicek (work) 716e11a584 Tests: Activate OSPF-VRF test 2020-04-28 03:52:47 +02:00
Ondrej Zajicek (work) 3c838ad9fd Tests: Activate BGP test 2020-04-22 17:14:02 +02:00
Nasato Goto a6548d5b5b BGP: Fix handling of 16bit-only ASN translation
The bug generated invalid AGGREGATOR attribute during translation of
32bit ASN to 16bit-only BGP peer. The patch fixes that.
2020-04-15 03:46:53 +02:00
Maria Matejka fd9f0c0640 Configuration strings are constant.
This is merely a const propagation. There was no problem in there.
2020-04-09 15:37:14 +02:00