Commit graph

210 commits

Author SHA1 Message Date
Ondrej Zajicek (work)
025525266f Timers: Replace old timers with microsecond timers
The old timer interface is still kept, but implemented by new timers. The
plan is to switch from the old inteface to the new interface, then clean
it up.
2017-12-07 13:49:27 +01:00
Ondrej Zajicek (work)
77810030d2 Merge branch 'master' into int-new 2017-05-30 14:44:37 +02:00
Ondrej Zajicek (work)
4fec43067e Workaround for older bisons 2017-05-30 14:43:49 +02:00
Ondrej Zajicek (work)
a1dc526760 Merge branch 'master' into int-new 2017-05-25 23:37:50 +02:00
Ondrej Zajicek (work)
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
Ondrej Zajicek (work)
6aaaa63519 Change parser to handle numbers as unsigned
Lexer always parsed numbers as unsigned, but parser handled them as
signed and grammar contained many unnecessary checks for negativity.
2017-05-23 17:40:19 +02:00
Pavel Tvrdik
0705a1c565 Add a hint for an invalid IP prefix
bird> eval 200.210.220.0/16
Invalid IPv4 prefix 200.210.220.0/16, maybe you wanted 200.210.0.0/16

bird> eval 1000:2000::/8
Invalid IPv6 prefix 1000:2000::/8, maybe you wanted 1000::/8
2017-05-23 15:59:27 +02:00
Ondrej Zajicek (work)
734e9fb8a9 Minor cleanups and fixes 2017-05-23 13:12:25 +02:00
Ondrej Zajicek (work)
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
Jan Moskyto Matejka
05d47bd53e Linpool: default allocation size 2017-05-16 15:34:57 +02:00
Ondrej Zajicek (work)
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
Jan Moskyto Matejka
3484cb9a65 Client: separate config syntax structure for "show route for" 2017-04-18 13:45:50 +02:00
Jan Moskyto Matejka
2faf519cf9 Client: multitable version of show route 2017-04-12 16:04:22 +02:00
Jan Moskyto Matejka
2282030b2a Simpler format of VPN RD 2017-03-28 17:35:32 +02:00
Jan Moskyto Matejka
3c74416465 Nexthop: Fixed recursive route mpls label merging 2017-03-17 15:48:32 +01:00
Ondrej Zajicek (work)
62e64905b7 Several minor fixes 2017-02-20 02:26:45 +01:00
Jan Moskyto Matejka
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
Jan Moskyto Matejka
d14f8c3c45 Netlink: MPLS routes in kernel
Anyway, Bird is now capable to insert both MPLS routes and MPLS encap
routes into kernel.

It was (among others) needed to define platform-specific AF_MPLS to 28
as this constant has been assigned in the linux kernel.

No support for BSD now, it may be added in the future.
2016-12-22 21:38:33 +01:00
Jan Moskyto Matejka
f2010f9c65 Static: Protocol rework wrt. struct nexthop changes; MPLS label support 2016-12-22 21:38:33 +01:00
Ondrej Zajicek (work)
77234bbbde Basic flow specification support (RFC 5575)
Add flow4/flow6 network and rt-table type and operations, config grammar
and static protocol support.

Squashed flowspec branch from Pavel Tvrdik.
2016-12-07 15:54:19 +01:00
Pavel Tvrdik
bd7958776b conf/conf.h: Fix a description of a variable in a structure 2016-11-30 11:57:35 +01:00
Pavel Tvrdik
1b7ddb0ea0 conf/conf.c: Revert some includes removing 2016-11-30 11:57:35 +01:00
Pavel Tvrdik
45ec4ce82a Lexer: Add a quotation mark back while parsing quotes
Thanks to Ondrej Zajicek for code.
2016-11-16 12:21:19 +01:00
Ondrej Zajicek (work)
9b0a0ba9e6 Unit Testing for BIRD
- Unit Testing Framework (BirdTest)
 - Integration of BirdTest into the BIRD build system
 - Tests for several BIRD modules

 Based on squashed Pavel Tvrdik's int-test branch, updated for
 current int-new branch.
2016-11-09 16:36:34 +01:00
Ondrej Zajicek (work)
8860e991f6 Merge branch 'master' into int-new 2016-11-08 19:27:58 +01:00
Ondrej Zajicek (work)
c8cafc8ebb Minor code cleanups 2016-11-08 17:46:29 +01:00
Ondrej Zajicek (work)
cc5b93f72d Merge tag 'v1.6.2' into int-new 2016-11-08 17:04:29 +01:00
Jan Moskyto Matejka
3e236955c9 Build: switch on -Wextra, get rid of most of the warnings
There are several unresolved -Wmissing-field-initializers on older
versions of GCC than 5.1, all of them false positive.
2016-11-01 14:52:54 +01:00
Pavel Tvrdik
768d5e1058 Add !~ operator to filter grammar 2016-09-21 13:35:52 +02:00
Ondřej Surý
61e6725335 Include <stdint.h> in cf-lex.l to avoid UINTx_MAX redefinition 2016-08-16 09:23:55 +02:00
Pavel Tvrdík
8f01879c56 cppcheck: fix va_end() functions 2016-06-27 15:07:50 +02:00
Jan Moskyto Matejka
925aa14912 After-master-merge simple fixes.
BSD lib/setkey.h and lib/sysio.h #include fixes.
OpenBSD's flex needs -o param without space.
V6ONLY for SK_IP fix.
2016-05-24 12:12:14 +02:00
Ondrej Zajicek (work)
af678af0d5 Merge remote-tracking branch 'origin/master' into int-new 2016-05-12 18:03:23 +02:00
Ondrej Zajicek (work)
286e2011d2 Miscellaneous minor fixes 2016-05-12 16:04:47 +02:00
Pavel Tvrdik
8e433d6a52 Prog Doc: Complete several missing parameters 2016-05-12 15:49:44 +02:00
Jan Moskyto Matejka
7152e5efbb Build system reworked to one global Makefile with includes and no nesting
Also removed the lib-dir merging with sysdep. Updated #include's
accordingly.

Fixed make doc on recent Debian together with moving generated doc into
objdir.

Moved Makefile.in into root dir

Retired all.o and birdlib.a
Linking the final binaries directly from all the .o files.
2016-05-10 14:07:34 +02:00
Pavel Tvrdík
1a7daab126 cf_error(char *msg, ...) -> cf_error(const char *msg, ...) 2016-03-10 16:07:44 +01:00
Ondrej Zajicek (work)
f4a60a9bc4 Channels - explicit links between protocols and tables
The patch adds support for channels, structures connecting protocols and
tables and handling most interactions between them. The documentation is
missing yet.
2016-02-01 10:28:50 +01:00
Pavel Tvrdík
7eb9e79648 Add condition for max_pxlen by ROA grammar 2016-01-21 10:37:08 +01:00
Pavel Tvrdík
a4caa1c0a3 Use net_addr pointer for net_addr_roaX
net_addr_roa6 is bigger than net_addr

Thanks to Ondrej Zajicek for notice
2016-01-21 10:37:08 +01:00
Pavel Tvrdík
650b418942 Delete old ROA code 2016-01-20 16:46:58 +01:00
Pavel Tvrdík
513ad0a85e Add ROA net_addr to grammar
Example:
  protocol static
  {
    route 10.110.0.0/16 max 16 as 1000 blackhole;
    route 10.120.0.0/16 max 24 as 1000 blackhole;
    route 10.130.0.0/16 max 24 as 2000 blackhole;
    route 10.130.128.0/18 max 24 as 3000 blackhole;
    ...
  }
2016-01-20 16:46:30 +01:00
Ondrej Zajicek (work)
e691d16a63 Explicit ip4_addr / ip6_addr printf support 2015-12-29 17:12:47 +01:00
Ondrej Zajicek (work)
04632fd77f Follow-up work on integration 2015-12-24 15:56:04 +01:00
Jan Moskyto Matejka
9656dce72e ROA code switchoff 2015-12-20 13:04:07 +01:00
Jan Moskyto Matejka
5e173e9f63 Stop perusing f_prefix for non-prefix-set uses
Multiple changes by Ondrej Santiago Zajicek
2015-12-19 23:49:47 +01:00
Jan Moskyto Matejka
d7661fbe9d Removed BITS_PER_IP_ADDRESS, MAX_PREFIX_LENGTH, BIRD_AF
Explicit setting of AF_INET(6|) in IP socket creation. BFD set to listen
on v6, without setting the V6ONLY flag to catch both v4 and v6 traffic.

Squashing and minor changes by Ondrej Santiago Zajicek
2015-12-19 15:57:09 +01:00
Ondrej Zajicek (work)
04ae8ddaa1 Merge branch 'master' into int-new 2015-11-25 14:24:35 +01:00
Ondrej Zajicek (work)
d44e686e9b Follow-up commit on integrated BIRD
Use net_addr for interface address prefixes, support net_addr in
configuration parser.
2015-11-12 02:03:59 +01:00
Ondrej Zajicek (work)
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