0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-09-19 20:05:21 +00:00
Commit Graph

759 Commits

Author SHA1 Message Date
Maria Matejka
7b91a3473c Uninitialized list nodes fixes 2019-08-17 14:18:41 +02:00
Maria Matejka
07c67f2ef9 Nest: Added const to ea_show just to declare that this shouldn't really change anything 2019-08-17 13:56:12 +02:00
Maria Matejka
4f81a9035a Nest: Several assumptions to tame the static analyzer 2019-08-17 13:53:50 +02:00
Maria Matejka
ad33995536 Nest: Assumption in rt-show for not-so-intuitive invariant. 2019-08-17 13:51:32 +02:00
Ondrej Zajicek (work)
f29478d993 Nest: Fix crash in route reload when some channels are not up.
Only channels that are up can be reloaded.
2019-08-13 19:00:25 +02:00
Ondrej Zajicek (work)
0d1966cc1d BGP: implement Adj-RIB-Out
The patch implements optional internal export table to a channel and
hooks it to BGP so it can be used as Adj-RIB-Out. When enabled, all
exported (post-filtered) routes are stored there. An export table can be
examined using e.g. 'show route export table bgp1.ipv4'.
2019-08-13 18:43:36 +02:00
Ondrej Zajicek (work)
b357f25932 BGP: Improve reconfiguration
Several BGP channel options (including 'next hop self') could be
reconfigured without session reset, with just route refeed/refresh.
The patch improves reconfiguration code to do it that way.
2019-08-05 14:43:49 +02:00
Ondrej Zajicek (work)
3e389e6786 Nest: Show mergable routes in 'show route' output
Routes mergable with the best route are marked by '+'.
2019-08-03 00:16:49 +02:00
Ondrej Zajicek (work)
0e1c3c3494 Nest: Add command to request graceful restart
When 'graceful down' command is entered, protocols are shut down
with regard to graceful restart. Namely Kernel protocol does
not remove routes and BGP protocol does not send notification,
just closes the connection.
2019-06-30 22:15:24 +02:00
Ondrej Zajicek (work)
3d23e41dcb Nest: Use rtable for neighbor lookup
Implicitly define rtables 'local4' and 'local6' and a pair of direct
protocols to fill them. Use modified net_route() for neighbor
lookup to avoid iterating over all interfaces.
2019-05-31 21:23:32 +02:00
Ondrej Zajicek (work)
7d1c2ea5c0 Nest: Use bitmask of pxlens to speed-up net_route()
Use bitmask to keep track of pxlens that might be in rtable to avoid
unnecessary lookups during net_route().
2019-05-28 17:23:32 +02:00
Ondrej Zajicek (work)
5c73cd94a5 Nest: Add hash table for interfaces, keyed by index
Useful if one have too many interfaces, as there are per-route
iface index lookups in routing table scan.
2019-05-14 19:01:44 +02:00
Ondrej Zajicek (work)
e092341df3 Nest: Handle unresolvable routes as invalid
Handle unresolvable routes (recursive routes that cannot be resolved) as
invalid, i.e. deprioritize tham and do not allow them for propagation.
Such route now shows as 'unresolvable' instead of 'unreachable'.
2019-05-10 15:02:21 +02:00
Ondrej Zajicek (work)
fc50b2196b Nest: Fix handling of ECMP next hop flags
Flag field was not copied when next hop was cached.
2019-02-17 23:03:41 +01:00
Ondrej Zajicek (work)
85646cd46a Nest: Report preferred counters also when 'import keep filtered' is enabled
Thanks to Michal Nowak for reporting the issue.
2019-02-17 23:02:05 +01:00
Ondrej Zajicek (work)
210dbc16c2 BGP: implement Adj-RIB-In
The patch implements optional internal import table to a channel and
hooks it to BGP so it can be used as Adj-RIB-In. When enabled, all
received (pre-filtered) routes are stored there and import filters can
be re-evaluated without explicit route refresh. An import table can be
examined using e.g. 'show route import table bgp1.ipv4'.
2019-02-17 23:02:05 +01:00
Maria Matejka
2ba6a02395 Nest: fixed corner cases on deleting from fib 2019-01-17 10:40:45 +01:00
Ondrej Zajicek (work)
a80055393e Nest: Add preferred counter 2019-01-16 15:16:51 +01:00
Jan Maria Matejka
4ff9aeb786 Nest: Get hash chain is not deprecated, it is still useful 2018-12-03 14:24:57 +01:00
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
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)
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
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
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)
b940579115 Filter: Allow silent filter execution
A filter should log messages only if executed explicitly (e.g., during
route export or route import). When a filter is executed for technical
reasons (e.g., to establish whether a route was exported before), it
should run silently.
2018-01-16 16:20:01 +01:00
Ondrej Zajicek (work)
2e507a7457 Use non-fatal asserts even for regular build 2018-01-10 16:17:37 +01:00
Ondrej Zajicek (work)
72163bd5f3 Nest: Allow modification of channels inherited from templates
Multiple definitions of same channels are forbidden, but inherited
channel can be redefined. In such case channel options are merged.
2018-01-09 18:42:22 +01:00
Ondrej Zajicek (work)
94f9be80c3 Nest: Fix filter reconfiguration
Function filter_same() must be called with arguments in proper order,
otherwise it breaks the new filter, causing crash during route
processing.
2018-01-09 14:36:11 +01:00
Ondrej Zajicek (work)
0ff86d054e ROA: Fix reconfiguration 2018-01-03 14:12:00 +01:00
Ondrej Zajicek (work)
d493d0f180 BGP: Fix unknown attribute handling 2018-01-02 16:57:45 +01:00
Ondrej Zajicek (work)
e87a95d97d Minor fixes for debug mode 2017-12-16 16:31:43 +01:00
Ondrej Zajicek (work)
8396094156 Minor cleanups 2017-12-14 22:15:01 +01:00
Ondrej Zajicek (work)
abd4367f48 Minor cleanup 2017-12-14 21:52:07 +01:00
Ondrej Zajicek (work)
d807ea087f BGP: Fix non-transitive ext communities 2017-12-13 15:57:44 +01:00
Ondrej Zajicek (work)
66acbc8d7f Revive FIB and kernel MPLS code 2017-12-12 00:05:49 +01:00
Ondrej Zajicek (work)
7fc55925be Several minor fixes 2017-12-10 00:55:34 +01:00
Jan Maria Matejka
3e52d112d7 Docs: Update to v2.0 2017-12-08 16:27:19 +01:00
Ondrej Zajicek (work)
517d05dff1 Enable ECMP and Link detection by default
ECMP is not enabled on BSD, where it is not supported by BIRD.
2017-12-08 16:00:33 +01:00