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

3254 Commits

Author SHA1 Message Date
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)
6b68390702 BGP: Fix 'deterministic med' to work with 'merge paths'
The 'deterministic med' option is implemented by suppressing other than
best-in-group routes (grouped by ASN) from best route selection. This
interferes with 'merge paths' as supressed routes are no longer mergable
with best route. This is fixed by suppressing only those routes that are
not mergable with best-in-group route.
2019-08-05 00:29:47 +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
Maria Matejka
b08ca3d958 More assertion categories 2019-08-01 14:25:01 +02:00
Maria Matejka
69f788bbce Log: Fixed race condition in reconfigure while BFD is running 2019-07-30 12:12:44 +02:00
Ondrej Zajicek (work)
36d5d2dd5c OSPF: Fix handling of NSSA option flags
Per RFC 3101, N-bit signalling NSSA support should be used only in Hello
packets, not in DBDES packets. BIRD since 2.0.4 verifies N-bit in
neighbor structure, which is learned from DBDES packets, therefore
NSSA-LSAs are not propagated to proper implementations of RFC 3101.

This patch fixes that. Both removing the check and removing N-bit from
DBDES packet. This will fix compatibility issues with proper
implementations, but causes compatibility issues with BIRD 2.0.4.
2019-07-10 18:48:50 +02:00
Ondrej Zajicek (work)
e8951ef5de OSPF: Update DR when local priority changes
When priority is reconfigured locally, we need to trigger DR election.
2019-07-10 18:40:15 +02:00
Ondrej Zajicek (work)
d0e4ba4a31 OSPF: Minor fix in graceful restart
Most LSA origination is blocked in ospf_update_topology(), this fix
blocks LSA origination from ospf_rt_spf().
2019-07-10 18:39:42 +02:00
Ondrej Zajicek (work)
b0eff444e2 OSPF: Fix handling of external routes on graceful restart
We need to flush learned external LSAs a bit later than other LSAs (after
first feed after end of the graceful restart) to avoid flap of external
routes.
2019-07-10 18:38:43 +02:00
Ondrej Zajicek (work)
a15749dd7a Add mock-up function for unit tests
They failed without it.
2019-06-30 22:59:57 +02:00
Ondrej Zajicek (work)
92f561b30f Add mock-up function for unit tests
They failed without it.
2019-06-30 22:31:31 +02:00
Ondrej Zajicek (work)
8bd2976780 Doc: OSPF graceful restart options 2019-06-30 22:26:43 +02:00
Ondrej Zajicek (work)
fc0eaaffed OSPF: Support for graceful restart
Implement OSPFv2 (RFC 3623) and OSPFv3 (RFC 5187) graceful restart,
for both restarting and helper sides. Graceful restart is initiated
by 'graceful down' command.
2019-06-30 22:23:57 +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)
3cd20658e2 OSPF: Do not use igp_metric as default for OSPF metric 2019-04-21 13:12:07 +02:00
Ondrej Zajicek (work)
9b73157ea1 BGP: Handle case where capabilites are not used
If peer does not announce capabilities at all, or when we have
capabilities disabled, handle that as implicit IPv4 unicast.
2019-03-15 20:57:26 +01:00
Ondrej Zajicek (work)
37dbd3fc7a Static: Allow to set multiple static route with different metric
Change the usage of preference to distinguish multiple static routes to a
separate metric attribute, Reuse igp_metric attribute for that purpose.

The static route metric is specified with 'metric' keyword immediately
after the network (to signify it is a part of key):

  route 10.10.0.0/24 metric 10 via 192.168.1.2;
2019-03-14 14:44:35 +01: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)
ed97d77073 OSPF: Reset LSAs during area type change
When area is reconfigured to a different type, we need to flush LSAs as
they may not be valid (e.g. NSSA-LSA for non-NSSA area). Also, when we
have have just one OSPF area and that changes type, we could restart OSPF
as there is no state to keep anyway. That solves issue with different
handling of external routes exported to OSPF based of main area type.
2019-02-17 23:02:06 +01:00
Ondrej Zajicek (work)
cb8ea2d907 OSPF: Basic support for DN-bit handling (RFC 4576)
External LSAs originated by OSPF routers with VPN-PE behavior enabled are
marked by DN flag and they are ignored by other OSPF routers with VPN-PE
enabled.
2019-02-17 23:02:05 +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)
a30b9d2800 OSPF: Opaque LSAs and Router Information LSA
Add support for OSPFv2 Opaque LSAs (RFC 5250) and for Router Information
LSA (RFC 7770). The second part is here mainly for testing opaque LSAs.
2019-02-17 23:02:05 +01:00
Ondrej Zajicek (work)
45426652a2 OSPF: Fix wrong LSA collisions detection
In some circumstances (old LSA flushed but not acknowledged and not
removed) origination of a new LSA may wrongly triggers LSA collision
code. The patch fixes that.

Thanks to Asbjorn Mikkelsen for the bugreport and @mdelagueronniere
for the original patch.
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
Ondrej Zajicek (work)
1e5dcb37ac OSPF: Send direct acknowledgements as unicast
Direct acknowledgements should be send as unicast to a corresponding
neighbor. Only delayed acks should be send as multicast to all/designated
routers.
2019-02-03 21:31:53 +01:00
Ondrej Zajicek (work)
99b2d10be0 OSPF: Reject duplicate DBDES packets after dead interval
Master may free last DBDES packet immediately. Slave must wait dead
interval before freeing last DBDES packet and then reject duplicate
DBDES packets with SeqNumberMismatch.
2019-02-03 21:31:15 +01:00
Ondrej Zajicek (work)
bf402c61e6 OSPF: DD seqnum should be initialized only for first attempts
After SeqNumberMismatch/BadLSReq, we should continue with the old
seqnum++. The old code tries to do that by n->adj, but it was set
nowhere.
2019-02-03 21:30:10 +01:00
Ondrej Zajicek (work)
2bbd72863f OSPF: Reject DBDES packets with non-matching MTU
As it is specified in RFC 2328. The old code just provided warning.
2019-02-03 21:27:02 +01:00
Ondrej Zajicek (work)
ccee5a863e BGP: Cleanup channels when going down
When going up, uncleaned old channel state may trigger unexpected
conditions crashing bird.
2019-01-28 15:23:54 +01:00
Maria Matejka
2ba6a02395 Nest: fixed corner cases on deleting from fib 2019-01-17 10:40:45 +01:00
Maria Matejka
eb04b725ef Redblack: fixed special deleting cases and missing parent pointer initialization 2019-01-17 10:40:45 +01:00
Ondrej Zajicek (work)
a80055393e Nest: Add preferred counter 2019-01-16 15:16:51 +01:00
Ondrej Zajicek (work)
c6faca916a OSPF: Add LSA retransmission counter 2018-12-21 14:26:04 +01:00
Jan Maria Matejka
c217fe593a Merge branch 'maarten' into mq-ordered 2018-12-12 13:10:10 +01:00
Jan Maria Matejka
e3e425303a Redblack test fixed to use uint as it was the original intent. 2018-12-12 13:03:13 +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
d8bd7b599b The other direction of searching and traversing 2018-12-03 14:24:09 +01:00
Jan Maria Matejka
db1577e902 Redblack: Added macros for partial tree traversal and even more unit tests 2018-12-03 13:55:35 +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
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