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

3278 Commits

Author SHA1 Message Date
Maria Matejka
4e07dc398e Updated dmalloc bindings 2019-08-19 15:03:19 +02:00
Maria Matejka
f638916c32 Lists: Replaced replace_node() by update_node() which is the only use of that function. 2019-08-19 15:02:49 +02:00
Maria Matejka
8d66a2403e Timer: Adding missing initializer. 2019-08-17 16:09:29 +02:00
Maria Matejka
d46a51041b Lexer: strtoul shall never set endptr to NULL; it should be an error 2019-08-17 15:03:09 +02:00
Maria Matejka
33e07e8114 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.
2019-08-17 14:57:41 +02:00
Maria Matejka
7b91a3473c Uninitialized list nodes fixes 2019-08-17 14:18:41 +02:00
Maria Matejka
72e97dc983 Lists: fix a stupid sanitizer bug 2019-08-17 14:03:47 +02:00
Maria Matejka
07c67f2ef9 Nest: Added const to ea_show just to declare that this shouldn't really change anything 2019-08-17 13:56:12 +02:00
Maria Matejka
14d6f6d75c OSPF: Zero-initialization of a temporary neighbor 2019-08-17 13:53:52 +02:00
Maria Matejka
4f81a9035a Nest: Several assumptions to tame the static analyzer 2019-08-17 13:53:50 +02:00
Maria Matejka
ad33995536 Nest: Assumption in rt-show for not-so-intuitive invariant. 2019-08-17 13:51:32 +02:00
Maria Matejka
c576a7e4af Static scanner and expensive debugging setup fix 2019-08-17 13:51:09 +02:00
Maria Matejka
fcc62d55e7 RPKI: fixed rare va_list leak 2019-08-17 13:50:48 +02:00
Maria Matejka
64bad8e71b Static check: Don't report dead code 2019-08-17 13:50:40 +02:00
Maria Matejka
3cbe3255aa OSPF: Adding a note about a static analyzer result. 2019-08-17 13:49:19 +02:00
Maria Matejka
051f258cad 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.
2019-08-17 13:49:10 +02:00
Maria Matejka
05b8620a81 List expensive check. 2019-08-17 13:49:04 +02:00
Maria Matejka
2e6bc86beb Expensive check declaration
Intended to be run at every operation with complex data structures
to check their consistency and validity.
2019-08-17 13:48:55 +02:00
Maria Matejka
a4ee61b66d IPv6 address parser: fail on incomplete addresses 2019-08-17 13:47:31 +02:00
Maria Matejka
763c124ef8 Filter/Trie: jump over branches that are never true in first iteration 2019-08-17 13:47:22 +02:00
Maria Matejka
531e0359d7 Not calling memcpy with n=0. 2019-08-17 13:46:30 +02:00
Maria Matejka
1c99f546bb Makefile rule for static analyzer 2019-08-17 13:44:43 +02:00
Ondrej Zajicek (work)
f29478d993 Nest: Fix crash in route reload when some channels are not up.
Only channels that are up can be reloaded.
2019-08-13 19:00:25 +02:00
Ondrej Zajicek (work)
0d1966cc1d BGP: implement Adj-RIB-Out
The patch implements optional internal export table to a channel and
hooks it to BGP so it can be used as Adj-RIB-Out. When enabled, all
exported (post-filtered) routes are stored there. An export table can be
examined using e.g. 'show route export table bgp1.ipv4'.
2019-08-13 18:43:36 +02:00
Ondrej Zajicek (work)
b357f25932 BGP: Improve reconfiguration
Several BGP channel options (including 'next hop self') could be
reconfigured without session reset, with just route refeed/refresh.
The patch improves reconfiguration code to do it that way.
2019-08-05 14:43:49 +02:00
Ondrej Zajicek (work)
6b68390702 BGP: Fix 'deterministic med' to work with 'merge paths'
The 'deterministic med' option is implemented by suppressing other than
best-in-group routes (grouped by ASN) from best route selection. This
interferes with 'merge paths' as supressed routes are no longer mergable
with best route. This is fixed by suppressing only those routes that are
not mergable with best-in-group route.
2019-08-05 00:29:47 +02:00
Ondrej Zajicek (work)
3e389e6786 Nest: Show mergable routes in 'show route' output
Routes mergable with the best route are marked by '+'.
2019-08-03 00:16:49 +02:00
Maria Matejka
b08ca3d958 More assertion categories 2019-08-01 14:25:01 +02:00
Maria Matejka
69f788bbce Log: Fixed race condition in reconfigure while BFD is running 2019-07-30 12:12:44 +02:00
Ondrej Zajicek (work)
36d5d2dd5c OSPF: Fix handling of NSSA option flags
Per RFC 3101, N-bit signalling NSSA support should be used only in Hello
packets, not in DBDES packets. BIRD since 2.0.4 verifies N-bit in
neighbor structure, which is learned from DBDES packets, therefore
NSSA-LSAs are not propagated to proper implementations of RFC 3101.

This patch fixes that. Both removing the check and removing N-bit from
DBDES packet. This will fix compatibility issues with proper
implementations, but causes compatibility issues with BIRD 2.0.4.
2019-07-10 18:48:50 +02:00
Ondrej Zajicek (work)
e8951ef5de OSPF: Update DR when local priority changes
When priority is reconfigured locally, we need to trigger DR election.
2019-07-10 18:40:15 +02:00
Ondrej Zajicek (work)
d0e4ba4a31 OSPF: Minor fix in graceful restart
Most LSA origination is blocked in ospf_update_topology(), this fix
blocks LSA origination from ospf_rt_spf().
2019-07-10 18:39:42 +02:00
Ondrej Zajicek (work)
b0eff444e2 OSPF: Fix handling of external routes on graceful restart
We need to flush learned external LSAs a bit later than other LSAs (after
first feed after end of the graceful restart) to avoid flap of external
routes.
2019-07-10 18:38:43 +02:00
Ondrej Zajicek (work)
a15749dd7a Add mock-up function for unit tests
They failed without it.
2019-06-30 22:59:57 +02:00
Ondrej Zajicek (work)
92f561b30f Add mock-up function for unit tests
They failed without it.
2019-06-30 22:31:31 +02:00
Ondrej Zajicek (work)
8bd2976780 Doc: OSPF graceful restart options 2019-06-30 22:26:43 +02:00
Ondrej Zajicek (work)
fc0eaaffed OSPF: Support for graceful restart
Implement OSPFv2 (RFC 3623) and OSPFv3 (RFC 5187) graceful restart,
for both restarting and helper sides. Graceful restart is initiated
by 'graceful down' command.
2019-06-30 22:23:57 +02:00
Ondrej Zajicek (work)
0e1c3c3494 Nest: Add command to request graceful restart
When 'graceful down' command is entered, protocols are shut down
with regard to graceful restart. Namely Kernel protocol does
not remove routes and BGP protocol does not send notification,
just closes the connection.
2019-06-30 22:15:24 +02:00
Ondrej Zajicek (work)
3d23e41dcb Nest: Use rtable for neighbor lookup
Implicitly define rtables 'local4' and 'local6' and a pair of direct
protocols to fill them. Use modified net_route() for neighbor
lookup to avoid iterating over all interfaces.
2019-05-31 21:23:32 +02:00
Ondrej Zajicek (work)
7d1c2ea5c0 Nest: Use bitmask of pxlens to speed-up net_route()
Use bitmask to keep track of pxlens that might be in rtable to avoid
unnecessary lookups during net_route().
2019-05-28 17:23:32 +02:00
Ondrej Zajicek (work)
5c73cd94a5 Nest: Add hash table for interfaces, keyed by index
Useful if one have too many interfaces, as there are per-route
iface index lookups in routing table scan.
2019-05-14 19:01:44 +02:00
Ondrej Zajicek (work)
e092341df3 Nest: Handle unresolvable routes as invalid
Handle unresolvable routes (recursive routes that cannot be resolved) as
invalid, i.e. deprioritize tham and do not allow them for propagation.
Such route now shows as 'unresolvable' instead of 'unreachable'.
2019-05-10 15:02:21 +02:00
Ondrej Zajicek (work)
3cd20658e2 OSPF: Do not use igp_metric as default for OSPF metric 2019-04-21 13:12:07 +02:00
Ondrej Zajicek (work)
9b73157ea1 BGP: Handle case where capabilites are not used
If peer does not announce capabilities at all, or when we have
capabilities disabled, handle that as implicit IPv4 unicast.
2019-03-15 20:57:26 +01:00
Ondrej Zajicek (work)
37dbd3fc7a Static: Allow to set multiple static route with different metric
Change the usage of preference to distinguish multiple static routes to a
separate metric attribute, Reuse igp_metric attribute for that purpose.

The static route metric is specified with 'metric' keyword immediately
after the network (to signify it is a part of key):

  route 10.10.0.0/24 metric 10 via 192.168.1.2;
2019-03-14 14:44:35 +01:00
Ondrej Zajicek (work)
fc50b2196b Nest: Fix handling of ECMP next hop flags
Flag field was not copied when next hop was cached.
2019-02-17 23:03:41 +01:00
Ondrej Zajicek (work)
ed97d77073 OSPF: Reset LSAs during area type change
When area is reconfigured to a different type, we need to flush LSAs as
they may not be valid (e.g. NSSA-LSA for non-NSSA area). Also, when we
have have just one OSPF area and that changes type, we could restart OSPF
as there is no state to keep anyway. That solves issue with different
handling of external routes exported to OSPF based of main area type.
2019-02-17 23:02:06 +01:00
Ondrej Zajicek (work)
cb8ea2d907 OSPF: Basic support for DN-bit handling (RFC 4576)
External LSAs originated by OSPF routers with VPN-PE behavior enabled are
marked by DN flag and they are ignored by other OSPF routers with VPN-PE
enabled.
2019-02-17 23:02:05 +01:00
Ondrej Zajicek (work)
85646cd46a Nest: Report preferred counters also when 'import keep filtered' is enabled
Thanks to Michal Nowak for reporting the issue.
2019-02-17 23:02:05 +01:00
Ondrej Zajicek (work)
a30b9d2800 OSPF: Opaque LSAs and Router Information LSA
Add support for OSPFv2 Opaque LSAs (RFC 5250) and for Router Information
LSA (RFC 7770). The second part is here mainly for testing opaque LSAs.
2019-02-17 23:02:05 +01:00