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

3262 Commits

Author SHA1 Message Date
Jan Maria Matejka
4067ad1aa4 Nest: Using the brand-new redblack tree to provide an ordered route listing 2018-12-03 10:31:59 +01:00
Jan Maria Matejka
a29de335c7 Red Black Tree: A structure to keep data sorted
This is a quite straightforward implementation of RBT together with
a unit test. It is assumed that all the keys are unique.

Capabilities: find, insert, delete, first, next.
2018-12-03 10:06:59 +01:00
Jan Maria Matejka
a943d1da41 Add a deprecated option 2018-12-03 10:05:40 +01:00
Ondrej Zajicek (work)
1a3aba5677 BGP: Add I/C/E flag for BGP routes to show route output
The flag indicates whether the route is internal (IBGP),
intra-confederation, or external (EBGP).
2018-12-01 18:04:11 +01:00
Ondrej Zajicek (work)
8972a08fab BGP: Statistics
Count message rx/tx, enqueued buckets/prefixes and recoverable
error conditions. Show them in 'show protocol all'
2018-11-30 22:10:14 +01:00
Ondrej Zajicek (work)
80a4c23b1e Unix: Implement log file size limit / log rotation
Allow to specify log file size limit and ensure that log file is rotated
to secondary name to avoid exceeding of log size limit.

The patch also fixes a bug related to keeping old fds open after
reconfiguration and using old fds after 'configure undo'.
2018-11-24 01:52:13 +01:00
Ondrej Zajicek (work)
9861dba523 Static: Allow multiple routes to the same network with different preference 2018-11-23 00:18:11 +01:00
Jan Maria Matejka
a4e825411a No more warnings ...
no more warnings
No more warnings over me
And while it is being compiled all the log is black and white
Release BIRD now and then let it flee

(use the melody of well-known Oh Freedom!)
2018-11-15 12:42:50 +01:00
Ondrej Zajicek (work)
8777f29783 Nest: Use 'distance' instead of 'preference' 2018-11-13 14:31:54 +01:00
Ondrej Zajicek (work)
bf58ebc0bb Nest: Update default preference based on Cisco values 2018-11-13 14:18:11 +01:00
Ondrej Zajicek (work)
668be0ffb3 Nest: Change preference to lower-is-better 2018-10-24 16:24:27 +02:00
Ondrej Zajicek (work)
5a96090a5b Nest: Statistics
Adds command 'show table statistics' to show statistics related
to routing tables.
2018-10-24 16:18:36 +02:00
Ondrej Zajicek (work)
60dda81b82 OSPF: Statistics
Count packet rx/tx and error conditions, per iface and globally.
Show them in 'show ospf' / 'show ospf interface'.

Also removee one level of indentation for areas in 'show ospf' command.
2018-10-24 16:15:28 +02:00
Ondrej Filip
4d3d34f599 Date added. 2018-03-22 13:30:10 +01:00
Ondrej Filip
966602602a Merge branch 'int-new' of ssh://gitlab.labs.nic.cz/labs/bird into int-new 2018-03-22 13:25:58 +01:00
Ondrej Zajicek (work)
4841804fff NEWS and version update 2018-03-21 16:33:08 +01:00
Ondrej Zajicek (work)
a177e4dd04 Doc: Minor update 2018-03-21 16:33:08 +01:00
Ondrej Zajicek (work)
3b522a1e5c Doc: Redesign default config file
The old one does not work with 2.0.x.
2018-03-20 19:28:26 +01:00
Ondrej Zajicek (work)
89ac4dd3c4 Merge remote-tracking branch 'birdlab-tmp/int-new' into int-new 2018-03-19 13:29:39 +01:00
Ondrej Zajicek (work)
bcb4af81fc Nest: Fix table reconfiguration when nettype changes
Thanks to Toke Hoiland-Jorgensen for the bugreport.
2018-03-18 13:48:47 +01:00
Ondrej Zajicek (work)
364d5823ea Nest: SADR support for Direct 2018-03-18 02:56:51 +01:00
Ondrej Zajicek (work)
159d619caf Doc: SADR documentation 2018-03-17 22:25:06 +01:00
Ondrej Zajicek (work)
7a8ae228f9 Doc: Update BGP documentation
Thanks to Joshua McQuistan for the bugreport.
2018-03-17 17:14:38 +01:00
Jan Maria Matejka
8a871e890a Merge branch 'master' into int-new 2018-03-14 12:57:16 +01:00
Jan Maria Matejka
e8bc64e308 Filter: make bgpmask literals real constructors
The bgpmask literals can include expressions. This is OK but they have
to be interpreted as soon as the code is run, not in the time the code
is used as value.

This led to strange behavior like rewriting bgpmasks when they shan't
be rewritten:

	function mask_generator(int as)
	{
		return [= * as * =];
	}

	function another()
	bgpmask m1;
	bgpmask m2;
	{
		m1 = mask_generator(10);
		m2 = mask_generator(20);
		if (m1 == m2) {
			print("strange"); # this would happen
		}
	}

Moreover, sending this to CLI would cause stack overflow and knock down the
whole BIRD, as soon as there is at least one route to execute the given
filter on.

	show route filter bgpmask mmm; bgppath ppp; { ppp = +empty+; mmm = [= (ppp ~ mmm) =]; print(mmm); accept; }

The magic match operator (~) inside the bgpmask literal would try to
resolve mmm, which points to the same bgpmask so it would resolve
itself, call the magic match operator and vice versa.

After this patch, the bgpmask literal will get resolved as soon as it's
assigned to mmm and it also will return a type error as bool is not
convertible to ASN in BIRD.
2018-03-14 11:34:29 +01:00
Jan Maria Matejka
e95705f00c Merge branch 'master' into int-new 2018-03-13 17:02:49 +01:00
Jan Maria Matejka
74bfd2f97c Filters: Removed FI_COMMA, not used for 19 years.
This instruction was removed in the commit linked below
and never used ever again. Rest in peace.

commit 84c7e1943f
Author: Pavel Machek <pavel@ucw.cz>
Date:   Tue Mar 2 19:49:28 1999 +0000
2018-03-13 17:01:37 +01:00
Jan Maria Matejka
d1ba927b36 Merge branch 'master' into int-new 2018-03-13 16:51:04 +01:00
Jan Maria Matejka
7c601e6b7b Filter: recursion to loop
It was supposed to do tail-recursion in interpret() but it didn't
compile as such. Converting it to loop makes a significant filter
performance improvement for flat filters.
2018-03-13 16:29:33 +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
Jan Maria Matejka
f2f5a7d945 Filter: the test conf checks also a bit of BGP args
Uncommented an old test.
2018-03-08 12:57:39 +01:00
Jan Maria Matejka
0575c7db72 Config: Dropped the ipv4:netmask4 syntax for IPv4 prefixes. 2018-03-08 12:57:39 +01:00
Ondrej Zajicek (work)
d0f47327f8 Merge branch 'master' into int-new 2018-03-07 17:41:49 +01:00
Ondrej Zajicek (work)
2d6d4b8053 Babel: Fix build with restricted protocol set
All keywords used in Babel config have to be declared locally.

Thanks to Leo Vandewoestijne for the bugreport.
2018-03-07 17:35:24 +01:00
Ondrej Filip
4406281260 Merge branch 'int-new' of ssh://gitlab.labs.nic.cz/labs/bird into int-new 2018-02-27 06:08:03 +01:00
Ondrej Zajicek (work)
1561ee799c Handle properly enums for extended attributes 2018-02-13 19:52:22 +01:00
Ondrej Zajicek (work)
d5144ea9bf Add cscope Makefile target
For those who prefer cscope to etags

Thanks to Toke Hoiland-Jorgensen for the patch.
2018-02-13 17:00:24 +01:00
Ondrej Zajicek (work)
5ce7adfcf9 Babel: Fix accidental bitwise or assignment
Fix an accidental bitwise or assignment that was supposed to be a
comparison.

Thanks to Toke Hoiland-Jorgensen for the patch.
2018-02-13 16:42:03 +01:00
Ondrej Zajicek (work)
185a0a51f8 Babel: Add source-specific routing support
This patch adds support for source-specific routing to the Babel protocol.
It changes the protocol to support both NET_IP6 and NET_IP6_SADR channels
for IPv6 addresses. If only a NET_IP6 channel is configured,
source-specific updates are ignored. Otherwise, non-source-specific
routes are simply treated as source-specific routes with SADR prefix 0.

Thanks to Toke Hoiland-Jorgensen for the original patch.
Minor changes by Ondrej Santiago Zajicek.
2018-02-13 16:40:14 +01:00
Ondrej Zajicek (work)
be17805c0b Add support for source-specific IPv6 routes to BIRD core
This patch adds support for source-specific IPv6 routes to BIRD core.
This is based on Dean Luga's original patch, with the review comments
addressed. SADR support is added to network address parsing in confbase.Y
and to the kernel protocol on Linux.

Currently there is no way to mix source-specific and non-source-specific
routes (i.e., SADR tables cannot be connected to non-SADR tables).

Thanks to Toke Hoiland-Jorgensen for the original patch.
Minor changes by Ondrej Santiago Zajicek.
2018-02-13 16:39:07 +01:00
Ondrej Zajicek (work)
a82f692e58 Nest: Trivial whitespace cleanup 2018-02-07 17:12:33 +01:00
Ondrej Zajicek (work)
28b3b55122 KRT: Fix IPv6 route learn
Internal table used for route learn was created with non-matching net
type for IPv6 kernel proto.

Thanks to Toke Hoiland-Jorgensen for the bugreport
2018-02-06 16:08:45 +01:00
Ondrej Zajicek (work)
85ad5855a0 Nest: Fix corner case in recursive next hop lookup
Thanks to Svenne Krap for the bugreport.
2018-01-29 12:49:37 +01:00
Ondrej Zajicek (work)
345e50d59f Nest: remove duplicate function 2018-01-24 13:55:12 +01:00
Ondrej Zajicek (work)
75d98b6013 Merge branch 'master' into int-new 2018-01-23 18:29:32 +01:00
Ondrej Zajicek (work)
d6cf996151 IO: Fix socket priority
On Linux, setting the ToS will also set the priority and the range of
accepted values is quite limited (masked by 0x1e). Therefore, 0xc0 is
translated to a priority of 0, not something we want, overriding the
"7" priority which was set previously explicitely. To avoid that, just
move setting priority later in the code.

Thanks to Vincent Bernat for the patch.
2018-01-23 17:05:45 +01:00
Ondrej Zajicek (work)
ace3072e09 KRT: Fix option 'merge paths' 2018-01-23 15:12:43 +01:00
Ondrej Zajicek (work)
e5ff7929c4 KRT: Remove useless option 2018-01-23 14:48:07 +01:00
Ondrej Zajicek (work)
def6efa1ef Doc: Fix example 2018-01-23 14:26:18 +01:00
Jan Maria Matejka
8adaf730c0 Pipe: show export state 2018-01-23 13:52:17 +01:00