1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

92 Commits

Author SHA1 Message Date
63e7620462 Conf/Filters: Moved argument count to conf scope 2019-06-25 16:18:06 +02:00
5c864e2cfa String: bstrtoul macro expanded to bstrtoul10 and 16 2019-06-13 14:27:58 +02:00
9eef9c648c Lexer now returns known sym / unknown sym / keyword 2019-05-17 22:26:21 +02:00
f249d0b84c Filters: comparison of functions and filters caching 2019-02-26 16:44:24 +01:00
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
99911873a1 Conf: Lexer parses quoted strings in a more descriptive way 2019-02-25 17:22:59 +01:00
0b39b1cbb7 Conf: Symbol implementation converted from void pointers to union
... and consted some declarations.
2019-02-20 22:30:55 +01:00
8bdb05edb2 Filters: split the large filter.h file to smaller files.
This should be revised, there are still ugly things in the filter API.
2019-02-20 22:30:54 +01:00
c0e958e022 Filter + Config: Fix bugs, tests and split symbols by type 2019-02-20 22:30:54 +01:00
d50b0bc437 Conf: Show the line:char position where the syntax error happens 2018-09-11 17:35:13 +02:00
77810030d2 Merge branch 'master' into int-new 2017-05-30 14:44:37 +02:00
4fec43067e Workaround for older bisons 2017-05-30 14:43:49 +02:00
a1dc526760 Merge branch 'master' into int-new 2017-05-25 23:37:50 +02:00
b7761af34d Conf: Replace keyword and symbol hash table with generic hash table.
The old hash table had fixed size, which makes it slow for config files
with large number of symbols and symbol lookups. The new one is growing
according to needs.
2017-05-25 23:30:39 +02:00
e521150b8f Fix VPN-RD parsing on 32-bit systems
When shift count >= width of type the behavior is undefined.
2017-05-18 14:51:36 +02:00
4278abfe27 Check validity of dest w.r.t. net_type
Allow to define static roa/flow routes without dest.
2017-04-18 13:56:40 +02:00
2282030b2a Simpler format of VPN RD 2017-03-28 17:35:32 +02:00
62e64905b7 Several minor fixes 2017-02-20 02:26:45 +01:00
d311368bc5 VPN4 and VPN6 literals
From now on, protocol static accepts VPN4 and VPN6 addressess.
With some concerns about VPN6 Route Distinguishers, I finally chose
to have the same format as for VPN4 (where it is defined by RFC 4364).
2016-12-22 21:38:33 +01:00
45ec4ce82a Lexer: Add a quotation mark back while parsing quotes
Thanks to Ondrej Zajicek for code.
2016-11-16 12:21:19 +01:00
8860e991f6 Merge branch 'master' into int-new 2016-11-08 19:27:58 +01:00
c8cafc8ebb Minor code cleanups 2016-11-08 17:46:29 +01:00
cc5b93f72d Merge tag 'v1.6.2' into int-new 2016-11-08 17:04:29 +01:00
768d5e1058 Add !~ operator to filter grammar 2016-09-21 13:35:52 +02:00
61e6725335 Include <stdint.h> in cf-lex.l to avoid UINTx_MAX redefinition 2016-08-16 09:23:55 +02:00
af678af0d5 Merge remote-tracking branch 'origin/master' into int-new 2016-05-12 18:03:23 +02:00
8e433d6a52 Prog Doc: Complete several missing parameters 2016-05-12 15:49:44 +02:00
9656dce72e ROA code switchoff 2015-12-20 13:04:07 +01:00
04ae8ddaa1 Merge branch 'master' into int-new 2015-11-25 14:24:35 +01:00
9b9a7143c4 Conf: Fixes bug in symbol lookup during reconfiguration
Symbol lookup by cf_find_symbol() not only did the lookup but also added
new void symbols allocated from cfg_mem linpool, which gets broken when
lookups are done outside of config parsing, which may lead to crashes
during reconfiguration.

The patch separates lookup-only cf_find_symbol() and config-modifying
cf_get_symbol(), while the later is called only during parsing. Also
new_config and cfg_mem global variables are NULLed outside of parsing.
2015-11-09 00:42:02 +01:00
fe9f1a6ded Initial commit on integrated BIRD
New data types net_addr and variants (in lib/net.h) describing
network addresses (prefix/pxlen). Modifications of FIB structures
to handle these data types and changing everything to use these
data types instead of prefix/pxlen pairs where possible.

The commit is WiP, some protocols are not yet updated (BGP, Kernel),
and the code contains some temporary scaffolding.

Comments are welcome.
2015-11-05 12:48:52 +01:00
bc7f4e0e34 Bump max symbol length to 64.
And move the constant to conf.h header.

Thanks to Alexander Chernikov for the patch.
2015-02-21 12:42:31 +01:00
88a183c6c9 Integrated IP functions. 2014-10-24 11:11:43 +02:00
b2f008378a Allows more constants in set literals.
Thanks to Michael Fincham for the bugreport.
2014-10-02 12:52:50 +02:00
0c3d9dacaf Fixes file descriptor leak when parser ends with error.
Thanks to MrBr for the bugreport.
2014-03-25 14:58:00 +01:00
1f64a487a0 Symbol names enclosed by apostrophes can contain colons. 2013-08-15 13:29:33 +02:00
1103b32e83 Allows to define constants of all filter types. 2013-07-25 22:33:57 +02:00
8c4da7e01d Symbol names enclosed by apostrophes can contain DOTs. 2013-02-10 19:17:38 +01:00
4be266a983 Implements wildcard matching in config file include.
Also fixes some minor bugs in include.

Thanks Kelly Cochran for suggestion and draft patch.
2012-07-18 19:29:33 +02:00
af582c4811 Route Origin Authorization basics.
- ROA tables, which are used as a basic part for RPKI.
 - Commands for examining and modifying ROA tables.
 - Filter operators based on ROA tables consistent with RFC 6483.
2012-03-18 17:32:30 +01:00
c32c3f88f0 Fixes parsing larger numbers on 64bit platforms. 2011-12-22 13:44:43 +01:00
60fd666b79 Fixes missing header. 2011-11-10 09:22:38 +01:00
a7f23f581f Implements protocol templates.
Based on the patch from Alexander V. Chernikov.
Extended to support almost all protocols.
Uses 'protocol bgp NAME from TEMPLATE { ... }' syntax.
2011-11-07 00:31:23 +01:00
9b7fdfc84a Fixes for include. 2011-10-10 01:41:08 +02:00
48ec367aab Configuration can include other files. 2011-09-11 21:21:47 +02:00
b8cc390e7e Fixes several problems in filter syntax.
- Fixes several conflicts in the grammar.
 - Fixes a bug in (a..b, c) pair patterns.
 - Makes pair patterns orthogonal.
 - Allows term expressions in pair patterns without additional ( ).
 - Allows several comma separated values in switch cases.
2011-05-06 22:00:54 +02:00
26d92bb892 A hack to distinguish if..else from else: in case.
The old BIRD grammar needs two lookaheads to distinguish if..else from
else: in case, which caused the parser to fail on some combinations of
both expressions.

This patch replaces two tokens 'else' ':' by one token 'else:' to fix
that.
2011-03-23 12:49:53 +01:00
93e868c730 Implements Router Advertisement protocol. 2011-03-13 11:33:50 +01:00
506fa1a73e Merge several fixes suggested by Joakim Tjernlund. 2010-05-02 22:41:40 +02:00
e304fd4bcf Implements pattern match for 'show protocols' command.
And generally consolidates protocol commands.
2010-02-20 00:08:07 +01:00