]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
5 years agoTrie index: Finding the node relative from other node; storing the path. mq-trie-index
Maria Matejka [Wed, 17 Apr 2019 13:34:39 +0000 (15:34 +0200)] 
Trie index: Finding the node relative from other node; storing the path.

Will be useful for filter trie conversion

5 years agoTrie index: fixed walk macro, added a test
Maria Matejka [Wed, 17 Apr 2019 11:00:54 +0000 (13:00 +0200)] 
Trie index: fixed walk macro, added a test

5 years agoTest: raised iteration counts for some benchmarks
Maria Matejka [Tue, 16 Apr 2019 20:17:57 +0000 (22:17 +0200)] 
Test: raised iteration counts for some benchmarks

5 years agoTests: added a simple benchmark
Maria Matejka [Tue, 16 Apr 2019 19:01:13 +0000 (21:01 +0200)] 
Tests: added a simple benchmark

5 years agoFixed printf test on android
Maria Matejka [Tue, 16 Apr 2019 18:22:33 +0000 (20:22 +0200)] 
Fixed printf test on android

5 years agoTrie index: We can walk the trie.
Maria Matejka [Mon, 15 Apr 2019 14:08:40 +0000 (16:08 +0200)] 
Trie index: We can walk the trie.

5 years agoTrie Index: Growing works
Maria Matejka [Tue, 9 Apr 2019 20:51:40 +0000 (22:51 +0200)] 
Trie Index: Growing works

5 years agoTrie index: storing existence of indices
Maria Matejka [Tue, 9 Apr 2019 14:25:29 +0000 (16:25 +0200)] 
Trie index: storing existence of indices

5 years agoID Map: Introducing a maximum limit for the ID
Maria Matejka [Tue, 9 Apr 2019 11:38:39 +0000 (13:38 +0200)] 
ID Map: Introducing a maximum limit for the ID

5 years agoTrie index: insert and find of same-length data without growing
Maria Matejka [Fri, 5 Apr 2019 13:53:21 +0000 (15:53 +0200)] 
Trie index: insert and find of same-length data without growing

5 years agoBitops: u64_log2() and encoding variable-length bitstrings into u64
Maria Matejka [Mon, 8 Apr 2019 13:07:32 +0000 (15:07 +0200)] 
Bitops: u64_log2() and encoding variable-length bitstrings into u64

5 years agoDoc: Route attribute cleanups
Ondrej Zajicek (work) [Tue, 19 Mar 2019 18:38:32 +0000 (19:38 +0100)] 
Doc: Route attribute cleanups

5 years agoBGP: Mandatory option for channels
Ondrej Zajicek (work) [Tue, 19 Mar 2019 16:44:50 +0000 (17:44 +0100)] 
BGP: Mandatory option for channels

Allow to mark channel to be mandatory, and do not allow BGP sessions if
no common AFI/SAFI is established.

5 years agoBGP: Handle case where capabilites are not used
Ondrej Zajicek (work) [Fri, 15 Mar 2019 19:54:01 +0000 (20:54 +0100)] 
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.

5 years agoBuild: Automatic dependency tracking for generated files
Maria Matejka [Fri, 15 Mar 2019 14:07:00 +0000 (15:07 +0100)] 
Build: Automatic dependency tracking for generated files

5 years agoNest: Update handling of temporary attributes
Ondrej Zajicek (work) [Thu, 14 Mar 2019 16:22:22 +0000 (17:22 +0100)] 
Nest: Update handling of temporary attributes

The temporary atttributes are no longer removed by ea_do_prune(), but
they are undefined by store_tmp_attrs() protocol hooks. This fixes
several bugs where temporary attributes were removed when they should
not or not removed when they should be. The flag EAF_TEMP is no longer
needed and was removed.

Update all protocol make_tmp_attrs() / store_tmp_attrs() hooks to use
helper functions and to handle unset attributes properly.

Also fix some related bugs like improper handling of empty eattr list.

5 years agoOSPF: Improved handling of tmpattrs
Ondrej Zajicek (work) [Wed, 6 Mar 2019 17:14:12 +0000 (18:14 +0100)] 
OSPF: Improved handling of tmpattrs

Keep track of whether OSPF tmpattrs are actually defined for given route
(using flags in rte->pflags). That makes them behave more like real
eattrs so a protocol can define just a subset of them or they can be
undefined by filters.

Do not set ospf_metric2 for other than type 2 external OSPF routes and do
not set ospf_tag for non-external OSPF routes. That also fixes a bug
where internal/inter-area route propagated from one OSPF instance to
another is initiated with infinity ospf_metric2.

Thanks to Yaroslav Dronskii for the bugreport.

5 years agoNEWS and version update v2.0.4
Ondrej Zajicek (work) [Tue, 26 Feb 2019 17:19:35 +0000 (18:19 +0100)] 
NEWS and version update

5 years agoConf: Switch for faster (and slightly bigger) lexer
Maria Matejka [Fri, 22 Feb 2019 11:41:51 +0000 (12:41 +0100)] 
Conf: Switch for faster (and slightly bigger) lexer

5 years agoNest: Do not compare rte.flags during rte_update()
Ondrej Zajicek (work) [Fri, 22 Feb 2019 01:16:39 +0000 (02:16 +0100)] 
Nest: Do not compare rte.flags during rte_update()

Route flags are mosty internal state of rtable, they are not significant
to whether a route has changed. With the old code, all routes received as
a part of enhanced route refresh are always re-announced to other peers
due to change in REF_STALE.

5 years agoHTML are no longer generated in srcdir
Ondrej Zajicek (work) [Tue, 19 Feb 2019 17:30:28 +0000 (18:30 +0100)] 
HTML are no longer generated in srcdir

5 years agoDoc: Detect SP/OpenSP automatically
Ondrej Zajicek (work) [Tue, 19 Feb 2019 17:20:07 +0000 (18:20 +0100)] 
Doc: Detect SP/OpenSP automatically

5 years agoNest: Prevent withdraws from propagation back to source protocol (for accepted mode)
Ondrej Zajicek (work) [Tue, 19 Feb 2019 15:26:09 +0000 (16:26 +0100)] 
Nest: Prevent withdraws from propagation back to source protocol (for accepted mode)

Update for one of previous patches, handles the the issue for
first-accepted mode of route propagation.

5 years agoOSPF: Reset LSAs during area type change
Ondrej Zajicek (work) [Sun, 17 Feb 2019 00:54:01 +0000 (01:54 +0100)] 
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.

5 years agoOSPF: Basic support for DN-bit handling (RFC 4576)
Ondrej Zajicek (work) [Wed, 13 Feb 2019 14:40:22 +0000 (15:40 +0100)] 
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.

5 years agoOSPF: Do not originate Router-Information LSA
Ondrej Zajicek (work) [Sat, 9 Feb 2019 15:15:01 +0000 (16:15 +0100)] 
OSPF: Do not originate Router-Information LSA

As we do not have much usage for it yet.

5 years agoMerge remote-tracking branch 'origin/mq-opt'
Ondrej Zajicek (work) [Sat, 9 Feb 2019 14:53:16 +0000 (15:53 +0100)] 
Merge remote-tracking branch 'origin/mq-opt'

5 years agoNest: Improve export counter handling
Ondrej Zajicek (work) [Tue, 5 Feb 2019 18:00:43 +0000 (19:00 +0100)] 
Nest: Improve export counter handling

One of previous workarounds for phantom route avoidance breaks export
counters by expanding sending of spurious withdraws, which are send when
we are not sure whether we have advertised that routes in the past.
If not, then export counter is decreased, but it was not increased
before, so it overflows under zero.

The patch fixes that by sendung spurious withdraws, but not counting them
on export counter. That may lead to error in the other direction, but that
happens only as a race condition (i.e., in normal operation filters
return proper values about old route export state).

5 years agoNest: Report preferred counters also when 'import keep filtered' is enabled
Ondrej Zajicek (work) [Tue, 5 Feb 2019 14:59:26 +0000 (15:59 +0100)] 
Nest: Report preferred counters also when 'import keep filtered' is enabled

Thanks to Michal Nowak for reporting the issue.

5 years agoOSPF: Send direct acknowledgements as unicast
Ondrej Zajicek (work) [Sun, 3 Feb 2019 19:22:40 +0000 (20:22 +0100)] 
OSPF: Send direct acknowledgements as unicast

Direct acknowledgements should be send as unicast to a corresponding
neighbor. Only delayed acks should be send as multicast to all/designated
routers.

5 years agoOSPF: Reject duplicate DBDES packets after dead interval
Ondrej Zajicek (work) [Sun, 3 Feb 2019 16:31:27 +0000 (17:31 +0100)] 
OSPF: Reject duplicate DBDES packets after dead interval

Master may free last DBDES packet immediately. Slave must wait dead
interval before freeing last DBDES packet and then reject duplicate
DBDES packets with SeqNumberMismatch.

5 years agoOSPF: DD seqnum should be initialized only for first attempts
Ondrej Zajicek (work) [Sun, 3 Feb 2019 15:20:37 +0000 (16:20 +0100)] 
OSPF: DD seqnum should be initialized only for first attempts

After SeqNumberMismatch/BadLSReq, we should continue with the old
seqnum++. The old code tries to do that by n->adj, but it was set
nowhere.

5 years agoOSPF: Reject DBDES packets with non-matching MTU
Ondrej Zajicek (work) [Sun, 3 Feb 2019 14:45:43 +0000 (15:45 +0100)] 
OSPF: Reject DBDES packets with non-matching MTU

As it is specified in RFC 2328. The old code just provided warning.

5 years agoNest: Reestablish preferred counters
Ondrej Zajicek (work) [Sat, 2 Feb 2019 12:28:16 +0000 (13:28 +0100)] 
Nest: Reestablish preferred counters

5 years agoPerf: Added forgotten all-protocol options mq-opt
Maria Matejka [Fri, 1 Feb 2019 13:09:01 +0000 (14:09 +0100)] 
Perf: Added forgotten all-protocol options

5 years agoNest: FIB rehash values tweaked for better performance
Maria Matejka [Tue, 29 Jan 2019 14:19:06 +0000 (15:19 +0100)] 
Nest: FIB rehash values tweaked for better performance

5 years agoPerf: Prune the table after every loop to have clean state.
Maria Matejka [Tue, 29 Jan 2019 13:22:55 +0000 (14:22 +0100)] 
Perf: Prune the table after every loop to have clean state.

5 years agoPerf: Write also BIRD version to have all the needed data in the logfile
Maria Matejka [Thu, 31 Jan 2019 14:03:43 +0000 (15:03 +0100)] 
Perf: Write also BIRD version to have all the needed data in the logfile

5 years agoNest: Don't lookup net in table before filters are run.
Maria Matejka [Thu, 31 Jan 2019 14:02:15 +0000 (15:02 +0100)] 
Nest: Don't lookup net in table before filters are run.

Using dummy net instead. This should help with performance on rejected
routes.

5 years agoNest: Prevent withdraws from propagation back to source protocol
Ondrej Zajicek (work) [Wed, 30 Jan 2019 16:25:21 +0000 (17:25 +0100)] 
Nest: Prevent withdraws from propagation back to source protocol

The earlier fix loosen conditions for not running filters on old
route when deciding about route propagation to a protocol to avoid
issues with ghost routes in some race conditions.

Unfortunately, the fix also caused back-propagation of withdraws. For
regular updates, back-propagation is prevented in import_control hooks,
but these are not called on withdraws. For them, import_control hooks
are called on old routes instead, changing (old, NULL) notification
to (NULL, NULL), which is ignored. By not calling export processing
in some cases, the withdraw is not ignored and is back-propagated.

This patch fixes that by contract conditions so the earlier fix is not
applied to back-propagated updates.

5 years agoDoc: Add documentation for OSPF retransmit delay option
Ondrej Zajicek (work) [Sat, 26 Jan 2019 20:02:35 +0000 (21:02 +0100)] 
Doc: Add documentation for OSPF retransmit delay option

Thanks to Igor Podlesny for notification.

5 years agoDoc: Remove doc for already removed option
Ondrej Zajicek (work) [Sat, 26 Jan 2019 19:44:37 +0000 (20:44 +0100)] 
Doc: Remove doc for already removed option

5 years agoBGP: Cleanup channels when going down
Ondrej Zajicek (work) [Sat, 26 Jan 2019 18:48:16 +0000 (19:48 +0100)] 
BGP: Cleanup channels when going down

When going up, uncleaned old channel state may trigger unexpected
conditions crashing bird.

5 years agoOSPF: Opaque LSAs and Router Information LSA
Ondrej Zajicek (work) [Thu, 24 Jan 2019 21:34:33 +0000 (22:34 +0100)] 
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.

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 agoNEWS and version update v2.0.3
Ondrej Zajicek (work) [Fri, 4 Jan 2019 23:38:37 +0000 (00:38 +0100)] 
NEWS and version update

5 years agoUnix: Remove removed option from help
Ondrej Zajicek (work) [Fri, 4 Jan 2019 22:49:26 +0000 (23:49 +0100)] 
Unix: Remove removed option from help

Also includes minor cleanup of help.

5 years agoBSD: Fix TCP-MD5 code on current FreeBSD kernels
Ondrej Zajicek (work) [Fri, 4 Jan 2019 16:03:48 +0000 (17:03 +0100)] 
BSD: Fix TCP-MD5 code on current FreeBSD kernels

Current FreeBSD kernels require SA records for both directions.

Thanks to Joseph Mulloy and Andrey V. Elsukov for reporting and
solving the issue.

5 years agoDoc: README and INSTALL update
Ondrej Zajicek (work) [Thu, 3 Jan 2019 16:11:56 +0000 (17:11 +0100)] 
Doc: README and INSTALL update

Minor cleanups, updates and clarifications. Also removes (incomplete
and well-known) build steps from README, as they are better described
in INSTALL.

5 years agoBGP: Better dispatch of incoming connections
Ondrej Zajicek (work) [Wed, 2 Jan 2019 15:01:21 +0000 (16:01 +0100)] 
BGP: Better dispatch of incoming connections

Since v2 we have multiple listening BGP sockets, and each BGP protocol
has associated one of them. Use listening socket that accepted the
incoming connection as a key in the dispatch process so only BGP
protocols assocaited with that listening socket can be selected.
This is necesary for proper dispatch when VRFs are used.

5 years agoBGP: Postpone setting link_addr
Ondrej Zajicek (work) [Wed, 2 Jan 2019 14:57:14 +0000 (15:57 +0100)] 
BGP: Postpone setting link_addr

It may happen that the LLv6 address for given iface is not defined during
BGP start, so we postpone the check to the the session establishment.

5 years agoKRT: Fix debug messages in netlink code
Arthur Gautier [Fri, 28 Dec 2018 18:38:18 +0000 (19:38 +0100)] 
KRT: Fix debug messages in netlink code

5 years agoIO: Workaround for broken FreeBSD behavior
Ondrej Zajicek (work) [Tue, 18 Dec 2018 18:16:23 +0000 (19:16 +0100)] 
IO: Workaround for broken FreeBSD behavior

FreeBSD silently changes TTL to 1 when MSG_DONTROUTE is used, even when
it is explicitly set to another value. That breaks TTL security sockets,
including BFD which always uses TTL 255. Bad FreeBSD!

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

This protocol is highly experimental and nobody should use it in
production. Anyway it may help you getting some insight into what eats
so much time in filter processing.

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 agoNest: Handle labels_orig correctly in attribute cache
Ondrej Zajicek (work) [Tue, 18 Dec 2018 13:41:12 +0000 (14:41 +0100)] 
Nest: Handle labels_orig correctly in attribute cache

5 years agoOSPF: Fix wrong LSA collisions detection
Ondrej Zajicek (work) [Mon, 17 Dec 2018 16:01:08 +0000 (17:01 +0100)] 
OSPF: Fix wrong LSA collisions detection

In some circumstances (old LSA flushed but not acknowledged and not
removed) origination of a new LSA may wrongly triggers LSA collision
code. The patch fixes that.

Thanks to Asbjorn Mikkelsen for the bugreport and @mdelagueronniere
for the original patch.

5 years agoBGP: Extend 'next hop keep' and 'next hop self' options
Ondrej Zajicek (work) [Sun, 16 Dec 2018 22:44:24 +0000 (23:44 +0100)] 
BGP: Extend 'next hop keep' and 'next hop self' options

Extend 'next hop keep' and 'next hop self' options to have boolean values
(enabled / disabled) and also values 'ibgp'/ 'ebgp' to restrict it to
routes received from IBGP / EBGP. This allows to have it enabled by
default in some cases, matches features of other implementations, and
allows to handle some strange cases like EBGP border router with 'next
hop self' also doing IBGP route reflecting.

Change default of 'next hop keep' to enabled for route servers, and
'ibgp' for route reflectors.

Update documentation for these options.

5 years agoNest: Fix handling of ECMP next hop flags
Ondrej Zajicek (work) [Sun, 16 Dec 2018 22:39:53 +0000 (23:39 +0100)] 
Nest: Fix handling of ECMP next hop flags

Flag field was not copied when next hop was cached.

5 years agoNest: fix bug in previous patches related to channel reconfiguration
Ondrej Zajicek (work) [Sun, 16 Dec 2018 21:48:13 +0000 (22:48 +0100)] 
Nest: fix bug in previous patches related to channel reconfiguration

The patch d506263d... blocked adding channel during reconfiguration,
that broke protocols which use the same functiona also during init.
This patch fixes that.

5 years agoBGP: Better handling of non-matching AFI in nexthops
Ondrej Zajicek (work) [Sat, 15 Dec 2018 13:01:57 +0000 (14:01 +0100)] 
BGP: Better handling of non-matching AFI in nexthops

5 years agoDoc: Rename code documentation files back to Doc
Ondrej Zajicek (work) [Fri, 14 Dec 2018 01:03:42 +0000 (02:03 +0100)] 
Doc: Rename code documentation files back to Doc

5 years agoDoc: Move root of code documentation to doc dir
Ondrej Zajicek (work) [Fri, 14 Dec 2018 00:53:32 +0000 (01:53 +0100)] 
Doc: Move root of code documentation to doc dir

It reduces clutter in root and also avoid collision with doc dir on
case-insensitive filesystems when name back to Doc.

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!)