]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
6 years agoCustom number parser to speed up config parsing
Maria Matejka [Mon, 25 Feb 2019 22:28:36 +0000 (23:28 +0100)] 
Custom number parser to speed up config parsing

The glibc's generic parser is slow due to its versatility. Specialized
parsers for base-10 and base-16 are much faster and we don't use other
bases.

6 years agoConf: Lexer parses quoted strings in a more descriptive way
Maria Matejka [Mon, 25 Feb 2019 16:19:47 +0000 (17:19 +0100)] 
Conf: Lexer parses quoted strings in a more descriptive way

6 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

6 years agoEnabled link time optimization.
Maria Matejka [Wed, 20 Feb 2019 21:14:28 +0000 (22:14 +0100)] 
Enabled link time optimization.

6 years agoFilter: Interpreter merged into the common m4 generator.
Maria Matejka [Tue, 19 Feb 2019 11:34:16 +0000 (12:34 +0100)] 
Filter: Interpreter merged into the common m4 generator.

The config-time partial evaluation of constant expressions in filters is nearby.

6 years agoFilter: Fixed bugs in FI_CALL and FI_SWITCH
Maria Matejka [Mon, 18 Feb 2019 13:57:15 +0000 (14:57 +0100)] 
Filter: Fixed bugs in FI_CALL and FI_SWITCH

6 years agoTest: Added -d flag to die directly after first error.
Maria Matejka [Mon, 18 Feb 2019 13:56:49 +0000 (14:56 +0100)] 
Test: Added -d flag to die directly after first error.

6 years agoGDB: Added more pretty printers for filters
Maria Matejka [Mon, 18 Feb 2019 13:56:10 +0000 (14:56 +0100)] 
GDB: Added more pretty printers for filters

6 years agoFilter: More cleanup -- customized structures also in struct f_line_item
Maria Matejka [Fri, 15 Feb 2019 22:59:44 +0000 (23:59 +0100)] 
Filter: More cleanup -- customized structures also in struct f_line_item

6 years agoConf: Symbol implementation converted from void pointers to union
Maria Matejka [Fri, 15 Feb 2019 12:53:17 +0000 (13:53 +0100)] 
Conf: Symbol implementation converted from void pointers to union

... and consted some declarations.

6 years agoFilter: merged filter compare functions into common M4 file
Maria Matejka [Wed, 13 Feb 2019 11:25:30 +0000 (12:25 +0100)] 
Filter: merged filter compare functions into common M4 file

6 years agoFilter: Merged postfixify routine
Maria Matejka [Tue, 12 Feb 2019 19:37:32 +0000 (20:37 +0100)] 
Filter: Merged postfixify routine

6 years agoFilter: Merged filter line item dumpers into common generated source
Maria Matejka [Tue, 12 Feb 2019 13:16:28 +0000 (14:16 +0100)] 
Filter: Merged filter line item dumpers into common generated source

6 years agoFilter: auto-generating enum-to-string
Maria Matejka [Tue, 12 Feb 2019 10:35:41 +0000 (11:35 +0100)] 
Filter: auto-generating enum-to-string

6 years agoFilter generator: workaround for M4 claiming all the put-around code be on one line
Maria Matejka [Tue, 12 Feb 2019 10:31:18 +0000 (11:31 +0100)] 
Filter generator: workaround for M4 claiming all the put-around code be on one line

6 years agoFilter data manipulation functions separated to their file
Maria Matejka [Mon, 11 Feb 2019 16:12:48 +0000 (17:12 +0100)] 
Filter data manipulation functions separated to their file

6 years agoFilter: split the constructors to a separate file
Maria Matejka [Mon, 11 Feb 2019 15:44:14 +0000 (16:44 +0100)] 
Filter: split the constructors to a separate file

6 years agoConf: Fixed makefiles
Maria Matejka [Mon, 11 Feb 2019 14:27:47 +0000 (15:27 +0100)] 
Conf: Fixed makefiles

6 years agoFilter: merged filter instruction constructors, counting line size on instruction...
Maria Matejka [Fri, 8 Feb 2019 12:38:12 +0000 (13:38 +0100)] 
Filter: merged filter instruction constructors, counting line size on instruction construct

6 years agoTest: Fixed annoying warnings (and possible obscure bugs).
Maria Matejka [Fri, 8 Feb 2019 10:19:04 +0000 (11:19 +0100)] 
Test: Fixed annoying warnings (and possible obscure bugs).

6 years agoFilters: split the large filter.h file to smaller files.
Maria Matejka [Thu, 7 Feb 2019 20:25:38 +0000 (21:25 +0100)] 
Filters: split the large filter.h file to smaller files.

This should be revised, there are still ugly things in the filter API.

6 years agoFilter: M4 convertors polished a bit.
Maria Matejka [Wed, 6 Feb 2019 13:41:39 +0000 (14:41 +0100)] 
Filter: M4 convertors polished a bit.

6 years agoFilter + Config: Fix bugs, tests and split symbols by type
Maria Matejka [Wed, 30 Jan 2019 13:03:47 +0000 (14:03 +0100)] 
Filter + Config: Fix bugs, tests and split symbols by type

6 years agoGDB pretty printers: f_inst and f_val.
Maria Matejka [Wed, 23 Jan 2019 16:08:27 +0000 (17:08 +0100)] 
GDB pretty printers: f_inst and f_val.

6 years agoFilter: refactoring of instruction constructors
Maria Matejka [Mon, 21 Jan 2019 08:17:54 +0000 (09:17 +0100)] 
Filter: refactoring of instruction constructors

6 years agoFilter refactoring: dropped the recursion from the interpreter
Maria Matejka [Thu, 27 Dec 2018 13:26:11 +0000 (14:26 +0100)] 
Filter refactoring: dropped the recursion from the interpreter

This is a major change of how the filters are interpreted. If everything
works how it should, it should not affect you unless you are hacking the
filters themselves.

Anyway, this change should make a huge improvement in the filter performance
as previous benchmarks showed that our major problem lies in the
recursion itself.

There are also some changes in nest and protocols, related mostly to
spreading const declarations throughout the whole BIRD and also to
refactored dynamic attribute definitions. The need of these came up
during the whole work and it is too difficult to split out these
not-so-related changes.

6 years agoFilter refactoring: The instructions are converted to the switch body by M4
Maria Matejka [Thu, 20 Dec 2018 15:25:54 +0000 (16:25 +0100)] 
Filter refactoring: The instructions are converted to the switch body by M4

6 years agoFilter refactoring: Drop the roa check specific f_inst
Maria Matejka [Thu, 20 Dec 2018 15:07:59 +0000 (16:07 +0100)] 
Filter refactoring: Drop the roa check specific f_inst

6 years agoFilter refactoring: The constant f_val is simply included inside the instruction
Maria Matejka [Thu, 20 Dec 2018 14:25:04 +0000 (15:25 +0100)] 
Filter refactoring: The constant f_val is simply included inside the instruction

With 32 bits, size of the args is 12 bytes, the f_val is 20 bytes.
With 64 bits, size of the args is 24 bytes, the f_val the same.

This is not so nice on 32 bits, anyway the f_inst itself is
24 vs. 32 bytes and the overall size of filters must be 32k of
instructions to get to one megabyte of RAM eaten by f_inst.

Therefore it seems to be improbable for common user to get into
problems with this change.

6 years agoFilter refactoring: Changed arguments from separate unions to an array
Maria Matejka [Thu, 20 Dec 2018 13:55:40 +0000 (14:55 +0100)] 
Filter refactoring: Changed arguments from separate unions to an array

6 years agoFilter refactoring: Converted condition to three-args instruction
Maria Matejka [Thu, 20 Dec 2018 13:34:35 +0000 (14:34 +0100)] 
Filter refactoring: Converted condition to three-args instruction

6 years agoFilter refactoring: Some instructions eat up excessively much space.
Maria Matejka [Thu, 20 Dec 2018 13:29:47 +0000 (14:29 +0100)] 
Filter refactoring: Some instructions eat up excessively much space.

6 years agoFilter refactoring: Expanded the short instructions with common code.
Maria Matejka [Thu, 20 Dec 2018 13:05:32 +0000 (14:05 +0100)] 
Filter refactoring: Expanded the short instructions with common code.

This will make the further changes more straightforward.

6 years agoFilter refactoring: indentation fix
Maria Matejka [Tue, 18 Dec 2018 16:10:05 +0000 (17:10 +0100)] 
Filter refactoring: indentation fix

6 years agoFilter refactoring: The values are now saved on a custom stack.
Jan Maria Matejka [Mon, 17 Dec 2018 14:00:01 +0000 (15:00 +0100)] 
Filter refactoring: The values are now saved on a custom stack.

This shall help with performance.

6 years agoFilter refactoring: Passing the resulting struct f_val as a pointer.
Jan Maria Matejka [Mon, 17 Dec 2018 12:51:11 +0000 (13:51 +0100)] 
Filter refactoring: Passing the resulting struct f_val as a pointer.

This also drops the multiplexing of errors with the f_val itself
together with the T_RETURN f_val type flag.

6 years agoFilter refactoring: Moved filter instruction definition to a separate file
Jan Maria Matejka [Mon, 17 Dec 2018 12:08:08 +0000 (13:08 +0100)] 
Filter refactoring: Moved filter instruction definition to a separate file

6 years agoFilter refactoring: Moved the bitfield bit position formula to route.h
Jan Maria Matejka [Mon, 17 Dec 2018 11:58:01 +0000 (12:58 +0100)] 
Filter refactoring: Moved the bitfield bit position formula to route.h

6 years agoFilter refactoring: Moved the interpret macros inside the block
Jan Maria Matejka [Mon, 17 Dec 2018 11:48:33 +0000 (12:48 +0100)] 
Filter refactoring: Moved the interpret macros inside the block

6 years agoConfigure: Don't check for implicit fallthrough unless when debugging.
Jan Maria Matejka [Mon, 17 Dec 2018 11:45:21 +0000 (12:45 +0100)] 
Configure: Don't check for implicit fallthrough unless when debugging.

6 years agoFilter: Converted static global variables to a filter_state struct.
Jan Maria Matejka [Tue, 27 Feb 2018 14:39:39 +0000 (15:39 +0100)] 
Filter: Converted static global variables to a filter_state struct.

The static filter state was messy and blocked the planned parallel
execution of filters. Anyway, this will be also slower as the state
structure must be passed almost everywhere with us.

6 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

6 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

6 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.

6 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.

6 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.

6 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.

6 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'

6 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).

6 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.

6 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.

6 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.

6 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.

6 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.

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

6 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

6 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

6 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.

6 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

6 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.

6 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.

6 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.

6 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

6 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.

6 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.

6 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

6 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

6 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.

6 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.

6 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.

6 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.

6 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.

6 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

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

6 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.

6 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

6 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

6 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.

6 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.

6 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.

6 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.

6 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

6 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

6 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.

6 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.

6 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

6 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

6 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

6 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

6 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'.

6 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

6 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.

6 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.

6 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

6 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.

6 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

6 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.

6 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.

6 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

6 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.