]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
5 years agoPerf: template support mq-perf2
Maria Matejka [Mon, 17 Dec 2018 14:57:37 +0000 (15:57 +0100)] 
Perf: template support

5 years agoPerf: export mode for measuring feed time
Jan Maria Matejka [Thu, 1 Nov 2018 13:16:04 +0000 (14:16 +0100)] 
Perf: export mode for measuring feed time

5 years agoPerf: Nicer output
Jan Maria Matejka [Wed, 31 Oct 2018 11:02:16 +0000 (12:02 +0100)] 
Perf: Nicer output

5 years agoPerf: Protocol to measure BIRD performance internally
Maria Matějka [Fri, 26 Oct 2018 07:32:35 +0000 (09:32 +0200)] 
Perf: Protocol to measure BIRD performance internally

5 years agoNest: Changed struct network * in struct rte to const net_addr *. [WIP]
Maria Matejka [Tue, 30 Oct 2018 19:57:38 +0000 (20:57 +0100)] 
Nest: Changed struct network * in struct rte to const net_addr *. [WIP]

This allows filtering the route without even touching the table on
import. Therefore rejected routes don't mess with the table in any way.
Only accepted routes are linked to the table.

Kernel protocol still uses a dirty hack to get routes synchronized. This
should be sanitized in future to allow proper concurrency.

5 years agoNest: Don't make tmp_attr before preexport is called
Jan Maria Matejka [Fri, 14 Dec 2018 15:10:19 +0000 (16:10 +0100)] 
Nest: Don't make tmp_attr before preexport is called

5 years agoDebug: support for -gdwarf-4 is not available everywhere
Jan Maria Matejka [Fri, 14 Dec 2018 14:50:44 +0000 (15:50 +0100)] 
Debug: support for -gdwarf-4 is not available everywhere

5 years agoBGP: Do not prepend ASN in export from non-RS EBGP to RS EBGP
Ondrej Zajicek (work) [Wed, 12 Dec 2018 16:36:54 +0000 (17:36 +0100)] 
BGP: Do not prepend ASN in export from non-RS EBGP to RS EBGP

When route is exported to regular EBGP, local ASN should be prepended to
AS_PATH. When route is propagated by route server (between RS-marked
EBGP peers), it should not change AS_PATH. Question is what to do in
other cases (from non-RS EBGP, IBGP, or locally originated to RS EBGP).

In 1.6.x, we did not prepend ASN in non-RS EBGP or IBGP to RS EBGP, but
we prepended in local to RS EBGP.

In 2.0.x, we changed that so only RS-EBGP to RS-EBGP is not prepended.
We received some negative responses (thanks to heisenbug and Alexander
Zubkov), we decided to change it back. One reason is that it is simple
to modify the AS_PATH by filters, but not possible to un-modify
changes done by BGP itself. Also, as 1.6.x behavior was not really
consistent, the final behavior is that ASN is never prepended when
exported to RS EBGP, like to IBGP.

Note that i do not express an opinion about whether such configurations
are even reasonable.

5 years agoDoc: Document log rotation feature
Ondrej Zajicek (work) [Wed, 12 Dec 2018 15:54:23 +0000 (16:54 +0100)] 
Doc: Document log rotation feature

5 years agoUpdate RFC references
Ondrej Zajicek (work) [Wed, 12 Dec 2018 15:38:30 +0000 (16:38 +0100)] 
Update RFC references

Progdoc comments do not allow SGML tags

5 years agoDoc: Document BGP import table option
Ondrej Zajicek (work) [Wed, 12 Dec 2018 15:04:15 +0000 (16:04 +0100)] 
Doc: Document BGP import table option

5 years agoNest: Update statistics and rx-limit for Adj-RIB-In
Ondrej Zajicek (work) [Tue, 11 Dec 2018 12:52:30 +0000 (13:52 +0100)] 
Nest: Update statistics and rx-limit for Adj-RIB-In

5 years agoBGP: implement Adj-RIB-In
Ondrej Zajicek (work) [Thu, 27 Sep 2018 20:57:55 +0000 (22:57 +0200)] 
BGP: implement Adj-RIB-In

The patch implements optional internal import table to a channel and
hooks it to BGP so it can be used as Adj-RIB-In. When enabled, all
received (pre-filtered) routes are stored there and import filters can
be re-evaluated without explicit route refresh. An import table can be
examined using e.g. 'show route import table bgp1.ipv4'.

5 years agoDoc: Fix typo in previous LinuxDoc change
Ondrej Zajicek (work) [Tue, 11 Dec 2018 17:43:58 +0000 (18:43 +0100)] 
Doc: Fix typo in previous LinuxDoc change

5 years agoNest: Forbid adding channels during reconfiguration
Ondrej Zajicek (work) [Tue, 11 Dec 2018 16:57:14 +0000 (17:57 +0100)] 
Nest: Forbid adding channels during reconfiguration

When a new channel is found during reconfiguration, do force restart
of the protocol, like with any other un-reconfigurable change.

The old behavior was that the new channel was added but remained in down
state, even if the protocol was up, so a manual protocol restart was
often necessary.

In the future this should be improved such that a reconfigurable
channel addition (e.g. direct) is accepted and channel is started,
while an un-reconfigurable addition forces protocol restart.

5 years agoOSPF: Fix reconfiguration of vlinks
Ondrej Zajicek (work) [Mon, 10 Dec 2018 01:11:42 +0000 (02:11 +0100)] 
OSPF: Fix reconfiguration of vlinks

Fix crash during reconfiguration of OSPF config with vlinks. When vlink
is reconfigured, a generic iface-reconfiguration code is used, which in
one place supposes that it is running on a regular iface.

Thanks to Cybertinus for a bugreport.

5 years agoMerge branch 'mq-custom' into int-new
Jan Maria Matejka [Thu, 6 Dec 2018 08:55:34 +0000 (09:55 +0100)] 
Merge branch 'mq-custom' into int-new

5 years agoCustom route attributes
Maria Matejka [Wed, 21 Nov 2018 19:37:11 +0000 (20:37 +0100)] 
Custom route attributes

For local route marking purposes, local custom route attributes may be
defined. These attributes are seamlessly stripped after export filter to
every real protocol like Kernel, BGP or OSPF, they however pass through
pipes. We currently allow at most 256 custom attributes.

This should be much faster than currently used bgp communities
for marking routes.

5 years agoDoc: Allow overriding $SGML_CATALOG_FILES using distribution specific paths
Robert Scheck [Tue, 4 Dec 2018 17:14:04 +0000 (18:14 +0100)] 
Doc: Allow overriding $SGML_CATALOG_FILES using distribution specific paths

5 years agoDoc: Add alternative path for SGML ISO entities 8879.1986 to $SGML_CATALOG_FILES
Robert Scheck [Tue, 4 Dec 2018 17:11:42 +0000 (18:11 +0100)] 
Doc: Add alternative path for SGML ISO entities 8879.1986 to $SGML_CATALOG_FILES

The existing paths are valid for Debian, alternative paths are necessary
for Fedora and RHEL/CentOS.

5 years agoUnix: Change debugging options
Ondrej Zajicek (work) [Tue, 4 Dec 2018 15:55:25 +0000 (16:55 +0100)] 
Unix: Change debugging options

The old behavior was that enabling debugging did many nontrivial changes
in BIRD behavior. The patch changes it that these changes are generally
independent. Compiling with --enable-debug now just enables compile-time
debug macros, but do not automatically activate debug mode (-d) nor local
mode (-l). Debug mode with output to file (-D) do not force foreground
mode (-f), therefore there is no need for backgroud option (-b), which is
removed. Also fixes a bug when the default log target in -D mode was
stderr instead of given debug file.

5 years agoHash: mem_hash doesn't modify the memory, declared constant
Jan Maria Matejka [Tue, 27 Nov 2018 07:49:31 +0000 (08:49 +0100)] 
Hash: mem_hash doesn't modify the memory, declared constant

5 years agoRoute table max hash size raised to 2^24.
Jan Maria Matejka [Thu, 1 Nov 2018 11:17:49 +0000 (12:17 +0100)] 
Route table max hash size raised to 2^24.

This is still OK for everybody to fit into RAM and also probably enough
to keep a little collision rate for full BGP table.

5 years agoChanged IPv4 hash function to simple multiplication.
Jan Maria Matejka [Tue, 30 Oct 2018 14:25:32 +0000 (15:25 +0100)] 
Changed IPv4 hash function to simple multiplication.

5 years agoTerminology cleanup: The import_control hook is now called preexport.
Jan Maria Matejka [Wed, 14 Feb 2018 12:42:53 +0000 (13:42 +0100)] 
Terminology cleanup: The import_control hook is now called preexport.

Once upon a time, far far away, there were the old Bird developers
discussing what direction of route flow shall be called import and
export. They decided to say "import to protocol" and "export to table"
when speaking about a protocol. When speaking about a table, they
spoke about "importing to table" and "exporting to protocol".

The latter terminology was adopted in configuration, then also the
bird CLI in commit ea2ae6dd0 started to use it (in year 2009). Now
it's 2018 and the terminology is the latter. Import is from protocol to
table, export is from table to protocol. Anyway, there was still an
import_control hook which executed right before route export.

One thing is funny. There are two commits in April 1999 with just two
minutes between them. The older announces the final settlement
on config terminology, the newer uses the other definition. Let's see
their commit messages as the git-log tool shows them (the newer first):

    commit 9e0e485e50ea74c4f1c5cb65bdfe6ce819c2cee2
    Author: Martin Mares <mj@ucw.cz>
    Date:   Mon Apr 5 20:17:59 1999 +0000

Added some new protocol hooks (look at the comments for better explanation):

make_tmp_attrs          Convert inline attributes to ea_list
store_tmp_attrs         Convert ea_list to inline attributes
import_control          Pre-import decisions

    commit 5056c559c4eb253a4eee10cf35b694faec5265eb
    Author: Martin Mares <mj@ucw.cz>
    Date:   Mon Apr 5 20:15:31 1999 +0000

Changed syntax of attaching filters to protocols to hopefully the final
version:

EXPORT <filter-spec>    for outbound routes (i.e., those announced
by BIRD to the rest of the world).
IMPORT <filter-spec>    for inbound routes (i.e., those imported
by BIRD from the rest of the world).

where <filter-spec> is one of:

ALL                     pass all routes
NONE                    drop all routes
FILTER <name>           use named filter
FILTER { <filter> }     use explicitly defined filter

For all protocols, the default is IMPORT ALL, EXPORT NONE. This includes
the kernel protocol, so that you need to add EXPORT ALL to get the previous
configuration of kernel syncer (as usually, see doc/bird.conf.example for
a bird.conf example :)).

Let's say RIP to this almost 19-years-old inconsistency. For now, if you
import a route, it is always from protocol to table. If you export a
route, it is always from table to protocol.

And they lived happily ever after.

5 years agoNest: Do not hard-reset interface when preferred address is changed
Ondrej Zajicek (work) [Wed, 28 Nov 2018 15:43:17 +0000 (16:43 +0100)] 
Nest: Do not hard-reset interface when preferred address is changed

Modify protocols to use preferred address change notification instead on
depending on hard-reset of interfaces in that case, and remove hard-reset
in that case. This avoids issue when e.g. IPv6 protocol restarts
interface when IPv4 preferred address changed (as hard-reset is
unavoidable and common for whole iface).

The patch also fixes a bug when removing last address does not send
preferred address change notification.

5 years agoAutoconf: Minor cleanup
Ondrej Zajicek (work) [Wed, 21 Nov 2018 15:30:22 +0000 (16:30 +0100)] 
Autoconf: Minor cleanup

5 years agoMRT documentation
Ondrej Zajicek (work) [Wed, 21 Nov 2018 15:00:22 +0000 (16:00 +0100)] 
MRT documentation

5 years agoThe MRT protocol
Ondrej Zajicek (work) [Tue, 20 Nov 2018 16:38:19 +0000 (17:38 +0100)] 
The MRT protocol

The new MRT protocol is responsible for periodic RIB table dumps in the
MRT format (RFC 6396). Also the existing code for BGP4MP MRT dumps is
refactored and splitted between BGP to MRT protocols, will be more
integrated into MRT in the future.

Example:

protocol mrt {
        table "*";
        filename "%N_%F_%T.mrt";
        period 60;
}

It is partially based on the old MRT code from Pavel Tvrdik.

5 years agoUnix: Implement log file size limit / log rotation
Ondrej Zajicek (work) [Wed, 14 Nov 2018 16:16:05 +0000 (17:16 +0100)] 
Unix: Implement log file size limit / log rotation

Allow to specify log file size limit and ensure that log file is rotated
to secondary name to avoid exceeding of log size limit.

The patch also fixes a bug related to keeping old fds open after
reconfiguration and using old fds after 'configure undo'.

5 years agoUnix: Refactor tracked files
Ondrej Zajicek (work) [Tue, 13 Nov 2018 17:13:11 +0000 (18:13 +0100)] 
Unix: Refactor tracked files

We need access to resource in order to free it.

5 years agoConfigure: Use standard --runstatedir option
Ondrej Zajicek (work) [Sun, 18 Nov 2018 00:22:09 +0000 (01:22 +0100)] 
Configure: Use standard --runstatedir option

Newer Autoconf defines --runstatedir option for setting directory for
run-time variable data. Use it instead our old --with-runtimedir.

5 years agoFilter: Make ifname attribute modifiable
Ondrej Zajicek (work) [Mon, 5 Nov 2018 21:03:21 +0000 (22:03 +0100)] 
Filter: Make ifname attribute modifiable

Allow to change an interface associated with a route by setting
ifname attribute. It will also change the route to a direct one.

5 years agoNest: Fix crash in rta_show() for RPKI and Babel routes
Ondrej Zajicek (work) [Mon, 5 Nov 2018 12:56:59 +0000 (13:56 +0100)] 
Nest: Fix crash in rta_show() for RPKI and Babel routes

Some new route source values did not have associated string
in rta_show(), which might caused crash in some cases.

5 years agoBGP: Fix VRF for listening socket
Ondrej Zajicek (work) [Fri, 26 Oct 2018 17:11:33 +0000 (19:11 +0200)] 
BGP: Fix VRF for listening socket

Listening socket should be bound to specified interface and VRF.

Thanks to Alexander Zubkov for the bugreport.

5 years agoOSPF: Fix some trace messages
Ondrej Zajicek (work) [Thu, 25 Oct 2018 15:22:37 +0000 (17:22 +0200)] 
OSPF: Fix some trace messages

Missing argument in MTU change trace message can crash bird when MTU
change happens and trace messages are active.

Thanks to Alexander Velkov for the bugreport.

5 years agoLib: Force output type in ip4_addr constructor
Ondrej Zajicek (work) [Thu, 25 Oct 2018 10:39:13 +0000 (12:39 +0200)] 
Lib: Force output type in ip4_addr constructor

Fixes type issue when u64 is pushed into it.

5 years agoFilter: Add support for VPN_RD sets
Ondrej Zajicek (work) [Thu, 25 Oct 2018 09:26:58 +0000 (11:26 +0200)] 
Filter: Add support for VPN_RD sets

5 years agoFilter: Fix minor bug in accessing bgp_path
Ondrej Zajicek (work) [Thu, 25 Oct 2018 09:23:15 +0000 (11:23 +0200)] 
Filter: Fix minor bug in accessing bgp_path

Not relevant for regular BGP paths, just for BGP paths added by filters
to e.g. static routes.

5 years agoFix installation with --disable-client
Ondrej Zajicek (work) [Thu, 11 Oct 2018 13:03:09 +0000 (15:03 +0200)] 
Fix installation with --disable-client

The old check assumed that @CLIENT@ does not contain
birdc, which is not true in 2.0 branc.

Thanks to Thomas Petazzoni for the bugreport and original patch.

5 years agoNest: Fix 'show interfaces summary' command
Ondrej Zajicek (work) [Thu, 11 Oct 2018 12:39:13 +0000 (14:39 +0200)] 
Nest: Fix 'show interfaces summary' command

The command showed interfaces that were removed / in shutdown.

5 years agoLib: Add and use ev_new_init()
Ondrej Zajicek (work) [Mon, 1 Oct 2018 13:55:23 +0000 (15:55 +0200)] 
Lib: Add and use ev_new_init()

5 years agoBGP: Fix bug in show protocol related to LLGR
Ondrej Zajicek (work) [Mon, 1 Oct 2018 13:35:43 +0000 (15:35 +0200)] 
BGP: Fix bug in show protocol related to LLGR

When channel is not active due to not be negotiated during sessino
establishment, the LLGR timer is not allocated, so we should not show it.

5 years agoNo more warnings ...
Jan Maria Matejka [Tue, 18 Sep 2018 12:21:11 +0000 (14:21 +0200)] 
No more warnings ...

no more warnings
No more warnings over me
And while it is being compiled all the log is black and white
Release BIRD now and then let it flee

(use the melody of well-known Oh Freedom!)

5 years agoConf: Show the line:char position where the syntax error happens
Jan Maria Matejka [Tue, 11 Sep 2018 14:55:41 +0000 (16:55 +0200)] 
Conf: Show the line:char position where the syntax error happens

5 years agoMain: Add -b to force background even in debug mode
Jan Maria Matejka [Tue, 28 Aug 2018 14:45:50 +0000 (16:45 +0200)] 
Main: Add -b to force background even in debug mode

5 years agoDoc: Fix description of 'description'
Ondrej Zajicek (work) [Fri, 24 Aug 2018 16:54:27 +0000 (18:54 +0200)] 
Doc: Fix description of 'description'

Thanks to Clemens Schrimpe for the bugreport.

5 years agoLib: recursive printf
Jan Maria Matejka [Wed, 22 Aug 2018 12:58:53 +0000 (14:58 +0200)] 
Lib: recursive printf

Use like this:

void func(const char *msg, va_list args) {
  ...
  bvsnprintf(buf, len, "file %s, line %d: %V (foo %d, bar %d)", file, line, msg, &args, foo, bar);
  ...
}

5 years agoDOC: Remove pipe mode reference
Ondrej Zajicek (work) [Tue, 21 Aug 2018 13:24:55 +0000 (15:24 +0200)] 
DOC: Remove pipe mode reference

Pipe mode was removed in 2.0, remove reference to it in the documentation.

Thanks to Piotr Wydrych for the bugreport.

5 years agoBison: A bit more verbose error messages in config.
Jan Maria Matejka [Tue, 14 Aug 2018 12:36:44 +0000 (14:36 +0200)] 
Bison: A bit more verbose error messages in config.

5 years agoMake: Add option to force colors in compiler output
Jan Maria Matejka [Tue, 17 Jul 2018 13:39:06 +0000 (15:39 +0200)] 
Make: Add option to force colors in compiler output

5 years agoM4: generate synchronization lines
Jan Maria Matejka [Tue, 17 Jul 2018 13:30:59 +0000 (15:30 +0200)] 
M4: generate synchronization lines

This also includes Bison version check. Versions before 3.0 don't
support them in a reliable way and we don't promise to work with
versions older than 2.4.

5 years agosysdep/unix/main.c: Remove trailing spaces
Pavel Tvrdik [Mon, 14 Nov 2016 13:53:10 +0000 (14:53 +0100)] 
sysdep/unix/main.c: Remove trailing spaces

5 years agoDoc: Fix notes related to obsolete option
Ondrej Zajicek (work) [Tue, 7 Aug 2018 12:46:24 +0000 (14:46 +0200)] 
Doc: Fix notes related to obsolete option

Thanks to Julien Dessaux for the report.

5 years agoBGP: Long-lived graceful restart
Ondrej Zajicek (work) [Tue, 31 Jul 2018 16:40:38 +0000 (18:40 +0200)] 
BGP: Long-lived graceful restart

The patch implements long-lived graceful restart for BGP, namely
draft-uttaro-idr-bgp-persistence-03.

5 years agoBSD: Use MSG_DONTROUTE for unicast packets on FreeBSD
Ondrej Zajicek (work) [Sat, 28 Jul 2018 14:54:06 +0000 (16:54 +0200)] 
BSD: Use MSG_DONTROUTE for unicast packets on FreeBSD

BSD systems cannot use SO_DONTROUTE, because it does not work properly
with multicast packets (perhaps it tries to find iface based on multicast
group address). But we can use MSG_DONTROUTE sendmsg() flag for unicast
packets. Works on FreeBSD, is ignored on OpenBSD and is broken on NetBSD
(i guess due to integrated routing table and ARP table).

5 years agoRAdv: Fix crash during prefix change
Ondrej Zajicek (work) [Thu, 19 Jul 2018 18:54:10 +0000 (20:54 +0200)] 
RAdv: Fix crash during prefix change

Thanks to Julian Schuh for the bugreport.

5 years agoOSPF: Fix crash during route removal
Ondrej Zajicek (work) [Thu, 19 Jul 2018 18:48:13 +0000 (20:48 +0200)] 
OSPF: Fix crash during route removal

The bug was introduced by an earler patch which removed additional eattr
argument to rt_notify hook.

5 years agoNest: Fix race condition during reconfiguration, part 2
Ondrej Zajicek (work) [Fri, 6 Jul 2018 00:04:45 +0000 (02:04 +0200)] 
Nest: Fix race condition during reconfiguration, part 2

If export filter is changed during reconfiguration and a route disappears
between reconfiguration and refeed (e.g., if the route is a static route
also removed during the reconfiguration), the route is not withdrawn.

The issue was fixed for regular channels by an earlier patch. This patch
fixes the issue for channels in RA_ACCEPTED mode (first-pass-the-filter),
used by BGP with 'secondary' option.

5 years agoCleanup some warnings
Ondrej Zajicek (work) [Tue, 3 Jul 2018 16:08:35 +0000 (18:08 +0200)] 
Cleanup some warnings

5 years agoNest: Fix race condition during reconfiguration
Ondrej Zajicek (work) [Tue, 3 Jul 2018 15:52:51 +0000 (17:52 +0200)] 
Nest: Fix race condition during reconfiguration

If export filter is changed during reconfiguration and a route disappears
between reconfiguration and refeed (e.g., if the route is a static route
also removed during the reconfiguration), the route is not withdrawn.
The patch fixes that by adding tx reconfiguration timestamp.

5 years agoBGP: Use implicit-NULL label when announcing MPLS routes with local next-hop
Ondrej Zajicek (work) [Sat, 30 Jun 2018 23:03:16 +0000 (01:03 +0200)] 
BGP: Use implicit-NULL label when announcing MPLS routes with local next-hop

We currently cannot assing local labels, but we can still be LSP egress
router. Therefore when we announce labeled route with local next-hop, we
should announce implicit-NULL label instead of rejecting it completely.

5 years agoBGP: Fix parsing of MPLS withdrawals
Ondrej Zajicek (work) [Sat, 30 Jun 2018 22:43:24 +0000 (00:43 +0200)] 
BGP: Fix parsing of MPLS withdrawals

RFC 3107 was bit vague with regard to labeled withdrawals, RFC 8277
clarified that. The old code was incompatible with some implementations,
namely with Juniper.

Thanks to Vadim Fedorenko for the original patch.

5 years agoBGP: Attribute set function merged with its common counterpart
Maria Jan Matejka [Fri, 29 Jun 2018 15:23:27 +0000 (17:23 +0200)] 
BGP: Attribute set function merged with its common counterpart

5 years agoBSD: Fix of the previous commit
Ondrej Zajicek (work) [Wed, 27 Jun 2018 15:08:59 +0000 (17:08 +0200)] 
BSD: Fix of the previous commit

5 years agoNest: Neighbor cache cleanups
Ondrej Zajicek (work) [Wed, 27 Jun 2018 14:51:53 +0000 (16:51 +0200)] 
Nest: Neighbor cache cleanups

Simplify neighbor cache code, fix several minor bugs, and improve
handling of ONLINK flag.

5 years agoAutotools: updated config.guess and config.sub
Maria Matejka [Mon, 23 Apr 2018 13:59:02 +0000 (15:59 +0200)] 
Autotools: updated config.guess and config.sub

Updated to version 63b4ce2e8c28aee6a32133e400436e4ca885215a
from git://git.savannah.gnu.org/config.git

Previous version was 93b5037172b15ad28952481933517f1ba93d125b

5 years agoAndroid: check for extra libs needed for build
Maria Matejka [Mon, 23 Apr 2018 13:54:20 +0000 (15:54 +0200)] 
Android: check for extra libs needed for build

5 years agoDoc: renamed progdoc files Doc -> progdoc to fix collision with doc/ folder on case...
Maria Matejka [Mon, 23 Apr 2018 09:29:13 +0000 (11:29 +0200)] 
Doc: renamed progdoc files Doc -> progdoc to fix collision with doc/ folder on case-insensitive filesystems

5 years agoConfig: Dropping CF_ADDTO.
Jan Maria Matejka [Tue, 26 Jun 2018 12:29:03 +0000 (14:29 +0200)] 
Config: Dropping CF_ADDTO.

5 years agoFilter: fixed eattr cached pointer
Jan Maria Matejka [Tue, 19 Jun 2018 14:16:08 +0000 (16:16 +0200)] 
Filter: fixed eattr cached pointer

Use ACCESS_RTE to guard **f_rte, use ACCESS_EATTRS to guard **f_eattrs.
Use f_rta_cow() before writing to rta or eattrs, use f_rte_cow() before
writing preference (stored in rte).

Do not access eattrs indirectly through (*f_rte)->attrs->eattrs, it is
way too slow. The cached pointer is faster.

5 years agoMerge branch 'int-new' into HEAD
Jan Maria Matejka [Tue, 19 Jun 2018 12:32:16 +0000 (14:32 +0200)] 
Merge branch 'int-new' into HEAD

5 years agoBabel: Fix handling of missing IPv4 next hops
Ondrej Zajicek (work) [Wed, 13 Jun 2018 13:22:29 +0000 (15:22 +0200)] 
Babel: Fix handling of missing IPv4 next hops

In case of missing IPv4 next hop, we should skip such routes
on transmit and ignore such routes on receive.

Thanks to Julian Schuh for the bugreport and Toke Hoiland-Jorgensen
for the original patch.

5 years agoBGP: Handle missing NEXT_HOP attribute properly
Ondrej Zajicek (work) [Wed, 13 Jun 2018 12:47:37 +0000 (14:47 +0200)] 
BGP: Handle missing NEXT_HOP attribute properly

RFC 7606 specifies handle-as-withdraw instead of session reset.

5 years agoNest: Removing separate tmpa from route propagation
Jan Maria Matejka [Tue, 29 May 2018 10:08:12 +0000 (12:08 +0200)] 
Nest: Removing separate tmpa from route propagation

This is a fundamental change of an original (1999) concept of route
processing inside BIRD. During import/export, there was a temporary
ea_list created which was to be used instead of the another one inside
the route itself.

This led to some confusion, quirks, and strange filter code that handled
extended route attributes. Dropping it now.

The protocol interface has changed in an uniform way -- the
`struct ea_list *attrs` argument has been removed from store_tmp_attrs(),
import_control(), rt_notify() and get_route_info().

5 years agoOSPF: Fix invalid NSSA RFC references
Ondrej Zajicek (work) [Tue, 29 May 2018 12:23:14 +0000 (14:23 +0200)] 
OSPF: Fix invalid NSSA RFC references

5 years agoProtocol: Introducing an enum protocol_class
Jan Maria Matejka [Mon, 7 May 2018 12:47:00 +0000 (14:47 +0200)] 
Protocol: Introducing an enum protocol_class

This supersedes the EAP_* constants.

5 years agoFilter: macro for recursive interpretation of instructions
Jan Maria Matejka [Wed, 2 May 2018 10:34:35 +0000 (12:34 +0200)] 
Filter: macro for recursive interpretation of instructions

5 years agoFilter: Simple type checks converted to ARG() macro
Jan Maria Matejka [Mon, 30 Apr 2018 14:06:53 +0000 (16:06 +0200)] 
Filter: Simple type checks converted to ARG() macro

5 years agoFilter: Removing the third argument hack
Jan Maria Matejka [Mon, 30 Apr 2018 11:29:05 +0000 (13:29 +0200)] 
Filter: Removing the third argument hack

Just to make the code a bit more clean and easier to maintain.

5 years agoFilter: instruction names
Jan Maria Matejka [Mon, 30 Apr 2018 10:49:22 +0000 (12:49 +0200)] 
Filter: instruction names

5 years agoFilter: Instruction codes linearized
Jan Maria Matejka [Mon, 30 Apr 2018 10:39:32 +0000 (12:39 +0200)] 
Filter: Instruction codes linearized

5 years agoMacro: Added a bunch of dirty C preprocessor tricks
Jan Maria Matejka [Mon, 30 Apr 2018 10:20:04 +0000 (12:20 +0200)] 
Macro: Added a bunch of dirty C preprocessor tricks

Included are Makefile implicit rules to show the preprocessed source.
When debugging something around this, it may be handy.

5 years agoDo not initialize route metrics in import_control hook
Ondrej Zajicek (work) [Thu, 24 May 2018 12:51:05 +0000 (14:51 +0200)] 
Do not initialize route metrics in import_control hook

During route export, the receiving protocol often initialized route
metrics to default value in its import_control hook before export filter
was executed. This is inconsistent with the expectation that an export
filter would process the same route as one in the routing table and it
breaks setting these metrics before (e.g. for static routes directly in
static protocol).

The patch removes the initialization of route metrics in import_control
hook, the default values are already handled in rt_notify hook called
after export filters.

The patch also changed the behavior of OSPF to keep metrics when a route
is reannounced between OSPF instances (to be consistent with other
protocols) and the behavior when both ospf_metric1 and ospf_metric2
are specified (to have more expected behavior).

5 years agoFilter: Add support for src filter op to access SADR source prefix
Ondrej Zajicek (work) [Wed, 16 May 2018 09:19:29 +0000 (11:19 +0200)] 
Filter: Add support for src filter op to access SADR source prefix

The patch allows to use 'net.src' to access SADR source prefix
from filters.

Thanks to Toke Hoiland-Jorgensen for the original patch for srclen.

5 years agoBetter initialization of random generator
Ondrej Zajicek (work) [Thu, 3 May 2018 15:07:39 +0000 (17:07 +0200)] 
Better initialization of random generator

Use full time precision to initialize random generator. The old
code was prone to initialize it to the same values in specific
circumstances (boot without RTC, multiple VMs starting at once).

5 years agoBabel: Add option to randomize router ID
Ondrej Zajicek (work) [Thu, 3 May 2018 14:55:11 +0000 (16:55 +0200)] 
Babel: Add option to randomize router ID

When a Babel node restarts, it loses its sequence number, which can cause
its routes to be rejected by peers until the state is cleared out by other
nodes in the network (which can take on the order of minutes).

There are two ways to fix this: Having stable storage to keep the sequence
number across restarts, or picking a different router ID each time.

This implements the latter, by introducing a new option that will cause
BIRD to randomize a high 32 bits of router ID every time it starts up.
This avoids the problem at the cost of not having stable router IDs in
the network.

Thanks to Toke Hoiland-Jorgensen for the patch.

5 years agoBabel: Fix type of route entry router ID
Ondrej Zajicek (work) [Thu, 3 May 2018 14:02:29 +0000 (16:02 +0200)] 
Babel: Fix type of route entry router ID

The router ID being assigned to routes was a uint, which discards the
upper 32 bits. This also has the nice side effect of echoing the wrong
router ID back to other routers.

Thanks to Toke Hoiland-Jorgensen for the patch.

5 years agoMakefile: Only set git version if BIRD is build from its repository.
Jan Maria Matejka [Thu, 3 May 2018 09:14:49 +0000 (11:14 +0200)] 
Makefile: Only set git version if BIRD is build from its repository.

Thanks to Toke Høiland-Jørgensen <toke@toke.dk> for reporting this bug.

6 years agoFilter: Added missing instruction comparators.
Jan Maria Matejka [Fri, 27 Apr 2018 12:38:41 +0000 (14:38 +0200)] 
Filter: Added missing instruction comparators.

These instructions caused SIGABORTs on reconfiguration.

6 years agoOSPF: Support of authentication trailer for OSPFv3
Ondrej Zajicek (work) [Wed, 25 Apr 2018 13:50:57 +0000 (15:50 +0200)] 
OSPF: Support of authentication trailer for OSPFv3

Implement RFC 7166, crypthographic authentication for OSPFv3
analogous to authentication used for OSPFv2.

6 years agoBGP: Fix extended next hop handling
Ondrej Zajicek (work) [Thu, 12 Apr 2018 14:55:56 +0000 (16:55 +0200)] 
BGP: Fix extended next hop handling

For IPv4 with extended next hop, we use MP-BGP format and therefore no
independent NEXT_HOP attribute.

Thanks to Arvin Gan for the bugreport.

6 years agoDoc: Documentation for BGP disable after cease option
Ondrej Zajicek (work) [Tue, 3 Apr 2018 15:31:45 +0000 (17:31 +0200)] 
Doc: Documentation for BGP disable after cease option

6 years agoDoc: Documentation for BGP extended next hop feature
Ondrej Zajicek (work) [Tue, 3 Apr 2018 14:53:58 +0000 (16:53 +0200)] 
Doc: Documentation for BGP extended next hop feature

Thanks to Arvin Gan for the bugreport.

6 years agoDoc: Remove some superfluous slashes
Ondrej Zajicek (work) [Sat, 24 Mar 2018 00:53:03 +0000 (01:53 +0100)] 
Doc: Remove some superfluous slashes

6 years agoAutoconf replaced by autoreconf
Ondrej Filip [Fri, 23 Mar 2018 16:24:58 +0000 (17:24 +0100)] 
Autoconf replaced by autoreconf

6 years agoDate added. v2.0.2
Ondrej Filip [Thu, 22 Mar 2018 12:30:10 +0000 (13:30 +0100)] 
Date added.

6 years agoMerge branch 'int-new' of ssh://gitlab.labs.nic.cz/labs/bird into int-new
Ondrej Filip [Thu, 22 Mar 2018 12:25:58 +0000 (13:25 +0100)] 
Merge branch 'int-new' of ssh://gitlab.labs.nic.cz/labs/bird into int-new

6 years agoNEWS and version update
Ondrej Zajicek (work) [Wed, 21 Mar 2018 14:17:56 +0000 (15:17 +0100)] 
NEWS and version update

6 years agoDoc: Minor update
Ondrej Zajicek (work) [Wed, 21 Mar 2018 15:32:51 +0000 (16:32 +0100)] 
Doc: Minor update