0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-13 22:58:42 +00:00
Commit Graph

33 Commits

Author SHA1 Message Date
Maria Jan Matejka
f93315c417 Config: Make the parser and lexer reentrant.
This is part of the multithreading journey. The parser and lexer were
using loads of global variables and all of these are now packed into
struct cf_context and others.

Note that the config API has changed:

* cfg_alloc[zu]?(size) is now cf_alloc[zu]?(ctx, size)
* cf_error(msg, ...) is now cf_error(ctx, msg, ...)
* config_parse() and cli_parse() are now called differently
* there is a brand new CF_CTX section in *.Y files which participates
  in struct cf_context construction
2018-09-14 14:44:45 +02:00
Jan Maria Matejka
cff9e937fd Filter: instruction names 2018-05-29 11:53:51 +02:00
Jan Maria Matejka
d1ba927b36 Merge branch 'master' into int-new 2018-03-13 16:51:04 +01:00
Maria Jan Matejka
5a14df3950 Filter: Instruction codes named as enum
The two-letter instructions were quite messy but they could be easily
read from memory dumps. Now GDB (since 2012) supports pretty printing
enum values and GCC checks the switch construction for missing enum
values so we are converting the nice two-byte values to enums.

Anyway, the enum still keeps the old two-byte values to be able to read
the instruction codes even without GDB from plain memory dump.
2018-03-13 16:29:33 +01:00
Ondrej Zajicek (work)
1561ee799c Handle properly enums for extended attributes 2018-02-13 19:52:22 +01:00
Pavel Tvrdík
0264ccf6f4 Rewrite roa_check() for integrated BIRD
Thanks to Ondrej Zajicek for his support with writing this code.
2016-01-20 16:46:58 +01:00
Jan Moskyto Matejka
9656dce72e ROA code switchoff 2015-12-20 13:04:07 +01:00
Ondrej Zajicek
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
Ondrej Zajicek
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
Ondrej Zajicek
8796a8a56e Fixes name for unnamed filters.
Thanks to Alexander V. Chernikov for the suggestion.
2012-03-15 12:50:49 +01:00
Ondrej Filip
48ec367aab Configuration can include other files. 2011-09-11 21:21:47 +02:00
Martin Mares
6ecd20605c ... and in the filter. 2004-06-05 09:26:55 +00:00
Pavel Machek
a96a979d5b Line numbers for runtime errors (what's wrong with cvs? I could not
commit this from home)
2000-05-16 18:50:51 +00:00
Pavel Machek
7d6eebae3b Create syntax sugar for add/delete/prepend, so xyzzy.prepend(123) is
possible. That means that milestone 3 was reached.
2000-04-20 10:25:51 +00:00
Pavel Machek
0150e5211a Cleaned up mess with types in e,a and e,S. Dynamic attributes should
now work.
2000-04-17 14:12:02 +00:00
Pavel Machek
ac7a2145cc f_new_dynamic_attr gets third argument, type as filters know it. 2000-04-12 14:02:04 +00:00
Martin Mares
66d573d490 Attribute type hack. 2000-04-12 13:55:30 +00:00
Martin Mares
3cf4a2e2b0 Removed lots of superfluous includes.
Use debug() instead of printf().
2000-03-31 23:35:59 +00:00
Pavel Machek
62ab789de5 Added type parameter to f_new_dynamic_attr. 2000-03-01 14:42:59 +00:00
Pavel Machek
31e79264a2 tmp_attrs fixed.
I do not know if it is right since mj ingores talk once started :-(.
2000-03-01 14:31:31 +00:00
Martin Mares
db1326aa5e Dynamic attributes are now declared in per-protocol grammar files instead
of filter/config.Y. Bird now compiles even if you disable RIP.

Removed RTA and IMPOSSIBLE tokens (unused).

Removed superfluous comment in filter.h.

I've tried to do my best, but Pavel, please check these changes.
2000-03-01 11:32:23 +00:00
Pavel Machek
c7b43f33ae Split inst->code into inst->code and inst->aux. Both are only 16 bit,
so aux is suitable for storing type but not much more.
1999-11-18 14:01:36 +00:00
Pavel Machek
23b1539bf9 Filters upgraded - a bit. Moved code to filter.c because it is where
it belongs. (f-util.c stays there for auxiliary and non-important things.)
1999-04-07 12:11:08 +00:00
Martin Mares
63a381dbf5 Several filter changes. (Pavel, please check if they are OK.)
o  Changed parameters of f_run. Changed rtein+rteout pair to rte pointer
      passed by reference, added ea_list of temporary attrs again passed
      by reference and finally added a pointer to memory pool for storing
      temporary data (new ea_lists's, temporary rta's etc.).
   o  Re-ordered result codes, so that all accepts come before all rejects.
   o  Introduced FILTER_ACCEPT and FILTER_REJECT dummy values (will be
      used in protocol configurations).
   o  Added filter_name() which returns name of a filter or ACCEPT/REJECT
      for the dummies.
1999-04-05 20:10:31 +00:00
Martin Mares
78d5ec1504 Please don't commit debugging code which makes BIRD exit before anything
actually starts to happen. Grrr.
1999-03-29 20:28:25 +00:00
Pavel Machek
ba92164871 Update of filters towards new interface. 1999-03-29 20:21:28 +00:00
Martin Mares
e0f2e42f4f A couple of filter tweaks:
o  Introduced struct filter which serves as an external reference
      to filter. Using struct symbol for this is unwise since it doesn't
      allow extra information attached to the filter and it also forces
      all filters to be named.
   o  Implemented config rule 'filter' which matches either named filter
      or an embedded unnamed filter (`{ <filter> }').
   o  Fixed totally bogus comment at the top of filter.h.
   o  Added a missing prototype for f_run() to filter.h.
1999-03-17 14:29:39 +00:00
Pavel Machek
3c7ad64c57 Compilation fix for mj. 1999-03-17 13:04:33 +00:00
Pavel Machek
d36d838df5 accept & reject should now work 1999-03-17 10:19:07 +00:00
Pavel Machek
b700582445 Filters are now a tiny bit stronger (if is actually working ;-) 1999-03-08 20:30:06 +00:00
Pavel Machek
84c7e1943f Add interface for running filters (please comment!), avoid bison warnings 1999-03-02 19:49:28 +00:00
Pavel Machek
ca3d562b24 filters_init() renamed to filters_postconfig(). 1999-01-15 18:13:55 +00:00
Pavel Machek
b9d70dc84e Filters, second try. This time they have their own directory. 1999-01-15 16:49:17 +00:00