Commit graph

3518 commits

Author SHA1 Message Date
Maria Matejka
a8ab54d18d Merge remote-tracking branch 'refs/remotes/origin/mq-filter-stack' into mq-filter-stack 2019-06-25 22:40:05 +02:00
Maria Matejka
63e7620462 Conf/Filters: Moved argument count to conf scope 2019-06-25 16:18:06 +02:00
Maria Matejka
2e0777317f Filter instructions don't confuse now v1 and res. 2019-06-21 11:33:28 +02:00
Maria Matejka
a84b8b6ebb Revert "Filter: Dropped the setter instructions in favor of direct result storage."
This reverts commit bd91338246.
2019-06-19 14:09:57 +02:00
Maria Matejka
5c864e2cfa String: bstrtoul macro expanded to bstrtoul10 and 16 2019-06-13 14:27:58 +02:00
Maria Matejka
87c82334a7 Filter: removal of semantically insane consts in filter_commit 2019-06-13 14:24:48 +02:00
Ondrej Zajicek (work)
bdf2e55d98 Add mock-up function for unit tests
They failed without it.
2019-06-12 18:02:01 +02:00
Ondrej Zajicek (work)
9106a750cd Add CLI command to test reconfiguration status
Based on patch from Kenth Eriksson <kenth.eriksson@infinera.com>.
2019-06-12 17:15:35 +02:00
Kenth Eriksson
8a2cbb88d1 BIRD coding conventions
Added Emacs config file describing BIRD coding conventions, as suggested
by Kenth Eriksson based on existing practice.
2019-06-12 16:37:12 +02:00
Ondrej Zajicek (work)
d35fb9d732 BGP: Fix bug introduced in one of last patches 2019-06-12 16:37:12 +02:00
Maria Matejka
bd91338246 Filter: Dropped the setter instructions in favor of direct result storage.
This should help filter performance a bit.
2019-06-03 10:41:35 +02:00
Maria Matejka
aa6c5f4d92 Filter: Just a little comments in filter structure 2019-05-30 14:42:54 +02:00
Maria Matejka
1757a6fce5 Filter: Stacks moved to thread-local storage if available. 2019-05-29 21:03:52 +02:00
Jan Maria Matejka
6479e403ef Filters: If somebody doesn't like _Thread_local, don't fail for now, just be a little slower.
When the parallel execution comes into place, we'll likely enforce this
C11 feature. It's much simpler and also faster than pthread_[sg]etspecific().
2019-05-23 11:27:24 +00:00
Jan Maria Matejka
23e3b1e665 Filter: Some people can't pronounce "postfixify" correctly. Let's try "linearize" instead.
This is just a naming change.
2019-05-22 15:20:02 +00:00
Jan Maria Matejka
96d757c13f Filter: Store variables and function arguments on stack 2019-05-21 16:33:37 +00:00
Jan Maria Matejka
20c6ea70cc Filter: Making the filter state thread local.
While having the filter code still reentrant if we really need,
the compiler can now do constant propagation and address the
thread local storage directly to save some computation time.
2019-05-20 17:53:10 +00:00
Maria Matejka
9eef9c648c Lexer now returns known sym / unknown sym / keyword 2019-05-17 22:26:21 +02:00
Ondrej Zajicek (work)
dbbe4a783b Doc: Dynamic BGP 2019-04-30 16:16:50 +02:00
Alexander Azimov
7ff34ca2cb BGP: Compliance with RFC8203bis 2019-04-30 13:55:43 +02:00
Ondrej Zajicek (work)
0b1e1e1a00 BGP: Output Local AS number in show protocol
Useful for implementation of agents implementing the SNMP-BGP MIB, which
requires the local AS of a session to be specified.

Thanks to Jan-Philipp Litza for the patch.
2019-04-30 13:44:11 +02:00
Ondrej Zajicek (work)
e0835db4f1 BGP: Dynamic BGP
Support for dynamically spawning BGP protocols for incoming connections.
Use 'neighbor range' to specify range of valid neighbor addresses, then
incoming connections from these addresses spawn new BGP instances.
2019-04-30 13:32:39 +02:00
Ondrej Filip
df092aa1de Small type in doc. 2019-04-24 13:49:18 +02:00
Ondrej Zajicek (work)
6ff8119765 OSPFv3: Fix some overlooked cases in IPv4 mode
Prefixes with max length (/32) were not handled properly.

Thanks to bauen1 for the bugreport.
2019-04-12 14:11:23 +02:00
Ondrej Zajicek (work)
4a50c8bd03 BGP: Handle corner cases in event ordering
When BGP connection is opened, it may happen that rx hook (with remote
OPEN) is called before tx hook (for local OPEN). Therefore, we need to do
internal changes (like setting local_caps) synchronously with OPENSENT
transition and we need to ensure that OPEN is sent before KEEPALIVE.
2019-04-08 16:56:56 +02:00
Ondrej Zajicek (work)
23ee6b1cd6 BGP: Promiscuous ASN mode
Allow to specify just 'internal' or 'external' for remote neighbor
instead of specific ASN. In the second case that means BGP peers with
any non-local ASNs are accepted.
2019-04-03 15:54:50 +02:00
Ondrej Zajicek (work)
a22c3e5968 BGP: Separate runtime and config usage of local/remote ip and as fields 2019-04-02 17:22:31 +02:00
Maria Matejka
fe503c7c06 Filter: fixed error-checking bug in !~ operator 2019-03-23 13:32:14 +01:00
Maria Matejka
7078aa63ae Fixed one warning and one undefined value. 2019-03-22 21:40:35 +01:00
Maria Matejka
2ab680c697 Fixed an undefined symbol bug in CLI introduced by filter refactoring 2019-03-20 16:50:58 +01:00
Ondrej Zajicek (work)
3a22a6e858 Doc: Route attribute cleanups 2019-03-19 19:38:32 +01:00
Ondrej Zajicek (work)
3c3605818f 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.
2019-03-19 17:44:50 +01:00
Ondrej Zajicek (work)
7e5f769d91 BGP: Handle case where capabilites are not used
If peer does not announce capabilities at all, or when we have
capabilities disabled, handle that as implicit IPv4 unicast.
2019-03-18 14:29:12 +01:00
Maria Matejka
8d65add626 Merge branch 'master' into HEAD 2019-03-18 12:54:40 +01:00
Maria Matejka
5d511948cd Build: Automatic dependency tracking for generated files 2019-03-18 12:32:11 +01:00
Maria Matejka
2f02c25e36 Perf: fixed stupid allocation bug 2019-03-15 16:34:26 +01:00
Maria Matejka
d638c1794a Gitlab CI: Drop CentOS 6 test build as unsupported.
If someone wants to maintain BIRD for CentOS 6,
feel free to send patches.
2019-03-15 16:34:19 +01:00
Ondrej Zajicek (work)
875cc073b0 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.
2019-03-14 17:31:40 +01:00
Ondrej Zajicek (work)
9aa77fcceb 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.
2019-03-06 18:28:00 +01:00
Maria Matejka
e1ac6f1e30 Faster filters: documentation on what is happening there 2019-03-06 15:01:39 +01:00
Maria Matejka
a68442e056 Fixed link time optimizer check for FreeBSD 2019-02-27 14:40:05 +01:00
Ondrej Zajicek (work)
b9deced219 NEWS and version update 2019-02-26 18:21:39 +01:00
Maria Matejka
f249d0b84c Filters: comparison of functions and filters caching 2019-02-26 16:44:24 +01:00
Maria Matejka
0d12aa4836 Build: No link time optimization when debug is enabled 2019-02-26 16:11:40 +01:00
Maria Matejka
2915e711f7 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.
2019-02-25 23:28:36 +01:00
Maria Matejka
99911873a1 Conf: Lexer parses quoted strings in a more descriptive way 2019-02-25 17:22:59 +01:00
Maria Matejka
7c36eb3e8b Conf: Switch for faster (and slightly bigger) lexer 2019-02-22 12:43:43 +01:00
Maria Matejka
412614c700 Conf: Switch for faster (and slightly bigger) lexer 2019-02-22 12:41:51 +01:00
Ondrej Zajicek (work)
93af78d2d2 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.
2019-02-22 02:16:39 +01:00
Maria Matejka
ad702bae0c Enabled link time optimization. 2019-02-20 22:30:55 +01:00