]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
4 years agoNest: Automatic channel reloads based on RPKI changes
Ondrej Zajicek (work) [Wed, 10 Feb 2021 02:09:57 +0000 (03:09 +0100)] 
Nest: Automatic channel reloads based on RPKI changes

If there are roa_check() calls in channel filters, then the channel
subscribes to ROA table notifications, which are sent when ROA tables
are updated (subject to settle time) and trigger channel reload or
refeed.

4 years agoFilter: Recursive filter iteration code
Ondrej Zajicek (work) [Sun, 7 Feb 2021 18:21:42 +0000 (19:21 +0100)] 
Filter: Recursive filter iteration code

Add macros for recursive filter iteration that allows to examine
all instructions reachable from a filter.

4 years agoMRT: Fix MP-BGP next hops
Ondrej Zajicek (work) [Fri, 22 Jan 2021 03:34:15 +0000 (04:34 +0100)] 
MRT: Fix MP-BGP next hops

Flag signalling that MP-BGP mode should be used got reset after first
batch of routes, so remaining routes were processed without that, leading
to missing MP_REACH_NLRI attribute.

Thanks to Piotr Wydrych for the bugreport.

4 years agoNetlink: Ignore dead routes
Ondrej Zajicek (work) [Thu, 14 Jan 2021 00:51:09 +0000 (01:51 +0100)] 
Netlink: Ignore dead routes

With net.ipv4.conf.XXX.ignore_routes_with_linkdown sysctl, a user can
ensure the kernel does not use a route whose target interface is down.
Such route is marked with a 'dead' / RTNH_F_DEAD flag.

Ignore these routes or multipath nexthops during scan.

Thanks to Vincent Bernat for the original patch.

4 years agoBuild: Fix tags generation
Ondrej Zajicek (work) [Tue, 12 Jan 2021 14:43:54 +0000 (15:43 +0100)] 
Build: Fix tags generation

4 years agoMRT: Fix IPv6 table dumps
Ondrej Zajicek (work) [Tue, 12 Jan 2021 14:37:01 +0000 (15:37 +0100)] 
MRT: Fix IPv6 table dumps

Add fake MP_REACH_NLRI attribute with BGP next hop when encoding MRT
table dumps for IPv6 routes. That is necessary to encode next hop as
NEXT_HOP attribute is not used for MP-BGP.

Thanks to Santiago Aggio for the bugreport.

4 years agoBFD: Dispatch sessions also by interface index
Ondrej Zajicek (work) [Sun, 10 Jan 2021 14:29:02 +0000 (15:29 +0100)] 
BFD: Dispatch sessions also by interface index

Direct BFD sessions needs to be dispatched not only by IP addresses, but
also by interfaces, in order to avoid collisions between neighbors with
the same IPv6 link-local addresses.

Extend BFD session hash_ip key by interface index to handle that. Use 0
for multihop sessions.

Thanks to Sebastian Hahn for the original patch.

4 years agoRPKI: Remove port (and SSH username) from 'Cache server' output line
Ondrej Zajicek (work) [Thu, 7 Jan 2021 04:56:34 +0000 (05:56 +0100)] 
RPKI: Remove port (and SSH username) from 'Cache server' output line

It was mixed-up if hostname is IPv6 address, and reporting separate
values (like port) on separate lines fits better into key-value style
of 'show protocols all' output. Also, the patch simplifies transport
identification formatting (although it is unused now).

Thanks to Alarig Le Lay for the suggestion.

4 years agoKernel: Do not check templates
Ondrej Zajicek (work) [Thu, 7 Jan 2021 00:56:00 +0000 (01:56 +0100)] 
Kernel: Do not check templates

So one can define kernel protocol template without channels.
For other protocols, it is either irrelevant or already done.

Thanks to Clemens Schrimpe for the bugreport.

4 years agoDoc: Describe per-nexthop static route options
Ondrej Zajicek (work) [Thu, 7 Jan 2021 00:20:56 +0000 (01:20 +0100)] 
Doc: Describe per-nexthop static route options

Also remove description of (no longer supported) per-route 'bfd' option,
and add examples of IPv6 routes with link-local nexthops.

4 years agoNest: remove last_tx_filter_change
Ondrej Zajicek (work) [Wed, 6 Jan 2021 13:51:49 +0000 (14:51 +0100)] 
Nest: remove last_tx_filter_change

No longer needed after redesign of export handling.

4 years agoBGP: Deprecate 'missing lladdr' option
Ondrej Zajicek (work) [Wed, 6 Jan 2021 13:44:23 +0000 (14:44 +0100)] 
BGP: Deprecate 'missing lladdr' option

The option is not implemented since transition to 2.0 and no plan to add it.
Also remove some deprecated RTS_* valus from documentation.

Thanks to Sébastien Parisot for notification.

4 years agoKernel: Fix handling of krt_realm with ECMP routes
Ondrej Zajicek (work) [Wed, 6 Jan 2021 04:25:59 +0000 (05:25 +0100)] 
Kernel: Fix handling of krt_realm with ECMP routes

For ECMP routes, RTA_FLOW attribute must be set per-nexthop, not
per-route. Our corresponding krt_realm attribute is per-route.

Thanks to Mikhail Petrov for the bugreport.

4 years agoNest: Read Babel metric as IGP metric
James Lu [Tue, 29 Dec 2020 01:23:54 +0000 (02:23 +0100)] 
Nest: Read Babel metric as IGP metric

(Minor syntactic changes by committer)

4 years agoStatic: Fix handling of 'net' attribute in per-route filters
Ondrej Zajicek (work) [Mon, 28 Dec 2020 20:19:27 +0000 (21:19 +0100)] 
Static: Fix handling of 'net' attribute in per-route filters

We need to define 'net' field temporarily as it may be accessed by
per-route filters.

Thanks to Damian Zaremba for the bugreport.

4 years agoFilter: Fix return on top-level
Ondrej Zajicek (work) [Mon, 28 Dec 2020 14:23:28 +0000 (15:23 +0100)] 
Filter: Fix return on top-level

Broken detection of top-level case caused crash when return was called
from top-of-stack position. It should behave as reject/accept.

Thanks to Damian Zaremba for the bugreport.

4 years agoNest: Per-channel debug flags
Ondrej Zajicek (work) [Mon, 7 Dec 2020 21:19:40 +0000 (22:19 +0100)] 
Nest: Per-channel debug flags

The patch add support for per-channel debug flags, currently just
'states', 'routes', and 'filters'. Flag 'states' is used for channel
state changes, remaining two for routes passed through the channel.
The per-protocol debug flags 'routes'/'filters' still enable reporting
of routes for all channels, to keep existing behavior.

The patch causes minor changes in some log messages.

4 years agoFilter: Add 'weight' route attribute
Ondrej Zajicek (work) [Wed, 2 Dec 2020 04:02:26 +0000 (05:02 +0100)] 
Filter: Add 'weight' route attribute

Add 'weight' route attribute that allows to get and set ECMP weight of
nexthops. Similar to 'gw' attribute, it is limited to the first nexthop,
but it is useful for handling BGP multipath, where an ECMP route is
merged from multiple regular routes.

4 years agoBGP: Zero the newly allocated bucket structure
Ondrej Zajicek (work) [Wed, 25 Nov 2020 14:44:00 +0000 (15:44 +0100)] 
BGP: Zero the newly allocated bucket structure

This fixes an issue with dirty node passed to add_tail().

Thanks to Andreas Rammhold for the initial patch.

4 years agoLog: Fix locking during log reconfiguration
Ondrej Zajicek (work) [Wed, 25 Nov 2020 14:15:13 +0000 (15:15 +0100)] 
Log: Fix locking during log reconfiguration

The log subsystem should be locked earlier, as default_log_list() may
internally manipulate with the current_log_list (if it is also a default
log list).

4 years agoLog: Reinitialize the static logging structures
Ondrej Zajicek (work) [Wed, 25 Nov 2020 14:04:34 +0000 (15:04 +0100)] 
Log: Reinitialize the static logging structures

The static logging structures are reused, we need to reinitialize them
otherwise add_tail() would fail in debug build. Reinitializing these
structures should be fine as the list they belong to is being
reinitialized on entry to the very same function.

Thanks to Andreas Rammhold and Mikael Magnusson for patches.

4 years agoMinor cleanups with cfg_allocz()
Ondrej Zajicek (work) [Tue, 24 Nov 2020 03:09:11 +0000 (04:09 +0100)] 
Minor cleanups with cfg_allocz()

Also fixes some more failed asserts due to add_tail().

4 years agoFix some failed asserts due to add_tail()
Ondrej Zajicek (work) [Tue, 24 Nov 2020 02:42:23 +0000 (03:42 +0100)] 
Fix some failed asserts due to add_tail()

When config structures are copied due to template application,
we need to reset list node structure before calling add_tail().

Thanks to Mikael Magnusson for patches.

4 years agoSome minor sl_allocz() cleanups
Ondrej Zajicek (work) [Tue, 24 Nov 2020 02:21:44 +0000 (03:21 +0100)] 
Some minor sl_allocz() cleanups

4 years agolib/slab: introduce sl_allocz() function and use it in Babel
Toke Høiland-Jørgensen [Tue, 24 Nov 2020 01:32:13 +0000 (02:32 +0100)] 
lib/slab: introduce sl_allocz() function and use it in Babel

The babel protocol code was initialising objects returned from the slab
allocator by assigning to each of the struct members individually, but
wasn't touching the NODE member while doing so. This leads to warnings on
debug builds since commit:

baac7009063d ("List expensive check.")

To fix this, introduce an sl_allocz() variant of the slab allocator which
will zero out the memory before returning it, and switch all the babel call
sites to use this version. The overhead for doing this should be negligible
for small objects, and in the case of babel, the largest object being
allocated was being zeroed anyway, so we can drop the memset in
babel_read_tlv().

4 years agoStatic: Support for multiple routes with the same network
Ondrej Zajicek (work) [Thu, 19 Nov 2020 15:38:39 +0000 (16:38 +0100)] 
Static: Support for multiple routes with the same network

Add support for proper handling of multiple routes with the same network
to the static protocol. Routes are distinguished by internal index, which
is assigned automatically (sequentially for routes within each network).
Having different route preference or igp_metric attribute is optional.

4 years agoDoc: Added example of static routes with BGP large communities
Nigel Kukard [Wed, 18 Nov 2020 17:00:12 +0000 (18:00 +0100)] 
Doc: Added example of static routes with BGP large communities

4 years agoOSPFv3: Fix intra-area-prefix-LSA origination on DR
Ondrej Zajicek (work) [Wed, 18 Nov 2020 16:37:29 +0000 (17:37 +0100)] 
OSPFv3: Fix intra-area-prefix-LSA origination on DR

When a new link-LSA is originated, we need to notify intra-area-prefix-LSA
handling, like when a new link-LSA is received. Otherwise a new network
prefix added to a DR is not propagated immediately.

Thanks to Bala Sajja for the bugreport.

4 years agoDoc: Fix typo
Ondrej Zajicek (work) [Sun, 15 Nov 2020 15:28:13 +0000 (16:28 +0100)] 
Doc: Fix typo

Thanks to Hexhu for the bugreport.

4 years agoNest: Fix crash in receive limit handling in import table
Ondrej Zajicek (work) [Sun, 15 Nov 2020 15:01:19 +0000 (16:01 +0100)] 
Nest: Fix crash in receive limit handling in import table

Logging as a result of triggered receive limit in import table code
accesset rte->net, which was not filed yet.

Thanks to Pier Carlo Chiodi for the bugreport.

4 years agoBFD: Update documentation about per-session options
Ondrej Zajicek (work) [Thu, 12 Nov 2020 03:50:45 +0000 (04:50 +0100)] 
BFD: Update documentation about per-session options

4 years agoBFD: Better handling of BFD options in BGP configs
Ondrej Zajicek (work) [Thu, 12 Nov 2020 03:02:38 +0000 (04:02 +0100)] 
BFD: Better handling of BFD options in BGP configs

Merge multiple BFD option blocks in BGP configs instead of using the last
one. That is necessary for proper handling of templates when BFD options
are used both in a BGP template and in a BGP protocol derived from that
template.

4 years agoBFD: Fix superfluous reconfiguration of sessions
Ondrej Zajicek (work) [Thu, 12 Nov 2020 01:37:42 +0000 (02:37 +0100)] 
BFD: Fix superfluous reconfiguration of sessions

4 years agoBFD: Allow per-request session options
Ondrej Zajicek (work) [Sun, 8 Nov 2020 14:33:22 +0000 (15:33 +0100)] 
BFD: Allow per-request session options

BFD session options are configured per interface in BFD protocol. This
patch allows to specify them also per-request in protocols requesting
sessions (currently limited to BGP).

4 years agoRPKI: Add 'ignore max length' option
Ondrej Zajicek (work) [Sat, 10 Oct 2020 22:53:19 +0000 (00:53 +0200)] 
RPKI: Add 'ignore max length' option

Add 'ignore max length' option to RPKI protocol, which ignores received
max length in ROA records and instead uses max value (32 or 128). This
may be useful for implementing loose RPKI check for blackholes.

4 years agoDoc: Fix missing semicolons
Ondrej Zajicek (work) [Mon, 5 Oct 2020 12:52:55 +0000 (14:52 +0200)] 
Doc: Fix missing semicolons

Thanks to Marco Gartmann for the bugreport.

4 years agoDoc: Fix typo
Ondrej Zajicek (work) [Mon, 5 Oct 2020 12:45:01 +0000 (14:45 +0200)] 
Doc: Fix typo

Thanks to Sergey Kulikov for the bugreport.

4 years agoOSPF: Fixed a debug assert
Maria Matejka [Mon, 31 Aug 2020 13:41:39 +0000 (15:41 +0200)] 
OSPF: Fixed a debug assert

4 years agoOSPF: Skip out-of-state packets earlier
Ondrej Zajicek (work) [Wed, 12 Aug 2020 17:42:44 +0000 (19:42 +0200)] 
OSPF: Skip out-of-state packets earlier

Sometimes multicast OSPF packet is received when neighbor adjacency is
not established. Such packet should be ignored earlier in packet
processing as otherwise it causes strange error messages when OSPFv3
authentication is enabled.

5 years agoNest: Keep route ordering during route updates
Ondrej Zajicek (work) [Thu, 16 Jul 2020 13:02:10 +0000 (15:02 +0200)] 
Nest: Keep route ordering during route updates

Put new non-best routes to the end of list instead of the second
position. Put updated routes to their old position. Position is changed
just by best route selection.

5 years agoShow info from multiple protocols when protocol is not specified
Ondrej Zajicek (work) [Thu, 14 May 2020 01:48:17 +0000 (03:48 +0200)] 
Show info from multiple protocols when protocol is not specified

Most commands like 'show ospf neighbors' fail when protocol is not
specified and there are multiple instances of given protocol type.
This is annoying in BIRD 2, as many protocols have IPv4 and IPv6
instances. The patch changes that by showing output from all protocol
instances of appropriate type.

Note that the patch also removes terminating cli_msg() call from these
commands and moves it to the common iterating code.

5 years agoFilter: Improve handling of sets in BGP path masks
Kazuki Yamaguchi [Sun, 28 Jun 2020 13:37:01 +0000 (15:37 +0200)] 
Filter: Improve handling of sets in BGP path masks

Compare the content of PM_ASN_SET in path masks. A reconfiguration
was not properly triggering a reload of affected protocols when the
members of a set in a path mask change.

Also, update the printing code to so that it can display sets in a path
mask.

5 years agoFilter: Fix comparison of BGP path mask
Kazuki Yamaguchi [Sun, 28 Jun 2020 13:33:26 +0000 (15:33 +0200)] 
Filter: Fix comparison of BGP path mask

Add a missing return statement. Path masks with the same length were all
considered the same. Comparing two with different length would cause
out-of-bounds memory access.

5 years agoOSPF: Fix bad header length test
Ondrej Zajicek (work) [Wed, 10 Jun 2020 11:27:14 +0000 (13:27 +0200)] 
OSPF: Fix bad header length test

Thanks to Slava Aseev for the thorough bugreport.

5 years agoDoc: Add 'ptp address' to OSPF doc overview
Kenth Eriksson [Wed, 3 Jun 2020 21:05:29 +0000 (23:05 +0200)] 
Doc: Add 'ptp address' to OSPF doc overview

5 years agoTest: Fix unit test mockups
Ondrej Zajicek (work) [Wed, 3 Jun 2020 14:15:29 +0000 (16:15 +0200)] 
Test: Fix unit test mockups

5 years agoNetlink: Fix parsing of MPLS multipath routes
Kazuki Yamaguchi [Wed, 3 Jun 2020 13:18:02 +0000 (15:18 +0200)] 
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)

5 years agoRPKI: Fix unnecessary reconnection on reconfiguration
Kazuki Yamaguchi [Wed, 3 Jun 2020 13:05:35 +0000 (15:05 +0200)] 
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.

5 years agoLog: Do not open logfiles when parse-and-exit option is active
Ondrej Zajicek (work) [Sun, 31 May 2020 11:21:55 +0000 (13:21 +0200)] 
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.

5 years agoOSPF: setting list node to zero before enlisting
Maria Matejka [Tue, 2 Jun 2020 14:58:06 +0000 (16:58 +0200)] 
OSPF: setting list node to zero before enlisting

5 years agoBabel: Set onlink flag for IPv4 routes with unreachable next hop
Ondrej Zajicek (work) [Tue, 26 May 2020 21:43:13 +0000 (23:43 +0200)] 
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.

5 years agoOSPF: Fix handling of unnumbered PtPs
Ondrej Zajicek (work) [Tue, 26 May 2020 16:21:43 +0000 (18:21 +0200)] 
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.

5 years agoNest: Allow key id 0
Ondrej Zajicek (work) [Tue, 19 May 2020 00:50:47 +0000 (02:50 +0200)] 
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.

5 years agoRIP: Triggered RIP (demand circuit) documentation
Ondrej Zajicek (work) [Mon, 18 May 2020 20:16:37 +0000 (22:16 +0200)] 
RIP: Triggered RIP (demand circuit) documentation

5 years agoNest: Implement BGP path mask loop operator
Ondrej Zajicek (work) [Mon, 18 May 2020 14:25:08 +0000 (16:25 +0200)] 
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.

5 years agoRIP: Fix handling of passive mode for demand circuit interfaces
Ondrej Zajicek (work) [Tue, 12 May 2020 01:46:47 +0000 (03:46 +0200)] 
RIP: Fix handling of passive mode for demand circuit interfaces

5 years agoNest: Fix neighbor handling for colliding ranges
Ondrej Zajicek (work) [Mon, 11 May 2020 02:29:36 +0000 (04:29 +0200)] 
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.

5 years agoTests: Activate BGP-int test
Ondrej Zajicek (work) [Tue, 5 May 2020 00:20:30 +0000 (02:20 +0200)] 
Tests: Activate BGP-int test

5 years agoTests: Change unsupported Ubuntu 19.04 for supported version 19.10
Matous Holinka [Wed, 29 Apr 2020 14:15:17 +0000 (16:15 +0200)] 
Tests: Change unsupported Ubuntu 19.04 for supported version 19.10

5 years agoFilter: Remove quitbird command
Ondrej Zajicek (work) [Wed, 29 Apr 2020 13:07:33 +0000 (15:07 +0200)] 
Filter: Remove quitbird command

No need for this debug filter command and it can be abused from CLI.

5 years agoFixed a harmless warning in production build
Maria Matejka [Fri, 1 May 2020 13:41:42 +0000 (15:41 +0200)] 
Fixed a harmless warning in production build

5 years agoMerge remote-tracking branch 'origin/mq-static-analysis'
Maria Matejka [Fri, 1 May 2020 13:34:17 +0000 (15:34 +0200)] 
Merge remote-tracking branch 'origin/mq-static-analysis'

5 years agoSlab: Init node in slab head to NULLs. mq-static-analysis
Maria Matejka [Mon, 19 Aug 2019 12:43:14 +0000 (14:43 +0200)] 
Slab: Init node in slab head to NULLs.

5 years agoTimer: Adding missing initializer.
Maria Matejka [Sat, 17 Aug 2019 14:09:29 +0000 (16:09 +0200)] 
Timer: Adding missing initializer.

5 years agoLexer: strtoul shall never set endptr to NULL; it should be an error
Maria Matejka [Sat, 17 Aug 2019 13:03:09 +0000 (15:03 +0200)] 
Lexer: strtoul shall never set endptr to NULL; it should be an error

5 years agoUnix socket: Path length check directly before copying the path.
Maria Matejka [Sat, 17 Aug 2019 12:57:41 +0000 (14:57 +0200)] 
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.

5 years agoLists: Replaced replace_node() by update_node() which is the only use of that function.
Maria Matejka [Mon, 19 Aug 2019 12:36:51 +0000 (14:36 +0200)] 
Lists: Replaced replace_node() by update_node() which is the only use of that function.

5 years agoLists: fix a stupid sanitizer bug
Maria Matejka [Sat, 17 Aug 2019 12:03:47 +0000 (14:03 +0200)] 
Lists: fix a stupid sanitizer bug

5 years agoUninitialized list nodes fixes
Maria Matejka [Sat, 17 Aug 2019 12:18:41 +0000 (14:18 +0200)] 
Uninitialized list nodes fixes

5 years agoNest: Added const to ea_show just to declare that this shouldn't really change anything
Maria Matejka [Sat, 17 Aug 2019 11:36:36 +0000 (13:36 +0200)] 
Nest: Added const to ea_show just to declare that this shouldn't really change anything

5 years agoOSPF: Zero-initialization of a temporary neighbor
Maria Matejka [Sat, 17 Aug 2019 08:28:55 +0000 (10:28 +0200)] 
OSPF: Zero-initialization of a temporary neighbor

5 years agoNest: Several assumptions to tame the static analyzer
Maria Matejka [Sat, 17 Aug 2019 08:20:46 +0000 (10:20 +0200)] 
Nest: Several assumptions to tame the static analyzer

5 years agoNest: Assumption in rt-show for not-so-intuitive invariant.
Maria Matejka [Sat, 17 Aug 2019 06:59:06 +0000 (08:59 +0200)] 
Nest: Assumption in rt-show for not-so-intuitive invariant.

5 years agoStatic scanner and expensive debugging setup fix
Maria Matejka [Sat, 17 Aug 2019 06:54:08 +0000 (08:54 +0200)] 
Static scanner and expensive debugging setup fix

5 years agoRPKI: fixed rare va_list leak
Maria Matejka [Fri, 16 Aug 2019 19:22:56 +0000 (21:22 +0200)] 
RPKI: fixed rare va_list leak

5 years agoStatic check: Don't report dead code
Maria Matejka [Fri, 16 Aug 2019 19:15:49 +0000 (21:15 +0200)] 
Static check: Don't report dead code

5 years agoOSPF: Adding a note about a static analyzer result.
Maria Matejka [Fri, 16 Aug 2019 12:04:53 +0000 (14:04 +0200)] 
OSPF: Adding a note about a static analyzer result.

5 years agoOSPF: variable-length array of size 0 replaced by alloca()'d pointer
Maria Matejka [Fri, 16 Aug 2019 10:47:13 +0000 (12:47 +0200)] 
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.

5 years agoList expensive check.
Maria Matejka [Wed, 14 Aug 2019 14:23:58 +0000 (16:23 +0200)] 
List expensive check.

5 years agoExpensive check declaration
Maria Matejka [Wed, 14 Aug 2019 14:22:39 +0000 (16:22 +0200)] 
Expensive check declaration

Intended to be run at every operation with complex data structures
to check their consistency and validity.

5 years agoIPv6 address parser: fail on incomplete addresses
Maria Matejka [Wed, 14 Aug 2019 10:29:04 +0000 (12:29 +0200)] 
IPv6 address parser: fail on incomplete addresses

5 years agoFilter: Don't alloc varargs array if its length would be zero
Maria Matejka [Wed, 14 Aug 2019 09:49:20 +0000 (11:49 +0200)] 
Filter: Don't alloc varargs array if its length would be zero

5 years agoFilter: Removed forgotten dead code
Maria Matejka [Wed, 14 Aug 2019 09:31:03 +0000 (11:31 +0200)] 
Filter: Removed forgotten dead code

5 years agoNon-null function argument declaration
Maria Matejka [Mon, 27 Apr 2020 20:33:10 +0000 (22:33 +0200)] 
Non-null function argument declaration

5 years agoBGP: Fix handling of strange IPv6 link-local-only next hops
Ondrej Zajicek (work) [Wed, 29 Apr 2020 00:50:29 +0000 (02:50 +0200)] 
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.

5 years agoMore assertion categories
Maria Matejka [Thu, 1 Aug 2019 12:25:01 +0000 (14:25 +0200)] 
More assertion categories

5 years agoNot calling memcpy with n=0.
Maria Matejka [Wed, 14 Aug 2019 08:28:23 +0000 (10:28 +0200)] 
Not calling memcpy with n=0.

5 years agoFilter: fixed omitted overflow check in EC constructor
Maria Matejka [Wed, 14 Aug 2019 09:06:49 +0000 (11:06 +0200)] 
Filter: fixed omitted overflow check in EC constructor

5 years agoMakefile rule for static analyzer
Maria Matejka [Wed, 14 Aug 2019 08:14:15 +0000 (10:14 +0200)] 
Makefile rule for static analyzer

5 years agoTests: Activate BGP-auth test
Ondrej Zajicek (work) [Tue, 28 Apr 2020 12:58:43 +0000 (14:58 +0200)] 
Tests: Activate BGP-auth test

5 years agoTests: Activate OSPF-VRF test
Ondrej Zajicek (work) [Tue, 28 Apr 2020 01:52:47 +0000 (03:52 +0200)] 
Tests: Activate OSPF-VRF test

5 years agoTests: Activate BGP test
Ondrej Zajicek (work) [Wed, 22 Apr 2020 14:03:37 +0000 (16:03 +0200)] 
Tests: Activate BGP test

5 years agoBGP: Fix handling of 16bit-only ASN translation
Nasato Goto [Wed, 15 Apr 2020 01:46:53 +0000 (03:46 +0200)] 
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.

5 years agoConfiguration strings are constant.
Maria Matejka [Wed, 8 Apr 2020 20:25:15 +0000 (22:25 +0200)] 
Configuration strings are constant.

This is merely a const propagation. There was no problem in there.

5 years agoDoc: Update prefix set comment
Ondrej Zajicek (work) [Sat, 28 Mar 2020 16:17:51 +0000 (17:17 +0100)] 
Doc: Update prefix set comment

5 years agoFletcher16 test fixed to work at bigendian architectures.
Maria Matejka [Sat, 4 Apr 2020 23:12:06 +0000 (01:12 +0200)] 
Fletcher16 test fixed to work at bigendian architectures.

To be honest, it was wrong in concept, anyway it accidentally worked.

5 years agoFilter: Remove mixed address tests and fix formatting
Ondrej Zajicek (work) [Thu, 26 Mar 2020 03:53:23 +0000 (04:53 +0100)] 
Filter: Remove mixed address tests and fix formatting

5 years agoFilter: Optimize IPv4 prefix sets
Ondrej Zajicek (work) [Thu, 26 Mar 2020 02:57:48 +0000 (03:57 +0100)] 
Filter: Optimize IPv4 prefix sets

Use separate IPv4 and IPv6 implementation of prefix sets. Just this
change makes IPv4 prefix sets 60% smaller and 50% faster.

5 years agoRIP: Improvements to demand circuit mode
Ondrej Zajicek (work) [Sat, 14 Mar 2020 16:04:49 +0000 (17:04 +0100)] 
RIP: Improvements to demand circuit mode

Restart iface after changing demand circuit mode during reconfiguration.
Fix next_regular interval reset during reconfiguration. Send flushing
response when iface goes down.

5 years agoPerf: changed route update pattern to be more like common protocols
Maria Matejka [Mon, 27 Jan 2020 16:42:11 +0000 (17:42 +0100)] 
Perf: changed route update pattern to be more like common protocols