0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00
Commit Graph

3271 Commits

Author SHA1 Message Date
Ondrej Zajicek (work)
68bc3ed98e Nest: Fix show route export
The showed route is a new structure as an export filter is applied on it
due to 'export' flag, then it is compared to the original best route to
see if it is the best one.

Bug already fixed in master branch.
2020-12-09 13:18:52 +01:00
Ondrej Zajicek (work)
6157f28a06 BGP: Always prefer older
When 'prefer older' is enabled, it should work even in EBGP.
2020-12-08 20:53:19 +01:00
Ondrej Zajicek (work)
5ae13e157f Nest: Change nexthop merging order to prefer earlier nexthops
When nexthop merge limit was applied, the old code used first N nexthops
in the canonical ordering. Now the code prefers nexthops based on the
order or routes in the network.
2020-08-27 03:24:04 +02:00
Ondrej Zajicek (work)
00cf501a0a Nest: Keep route ordering during route updates
Put new non-best routes to the end of list instead of the second
position. Put updated routes to their old position. Position is changed
just by best route selection.
2020-07-16 15:08:03 +02:00
Ondrej Zajicek (work)
d825b7d8f0 RIP: Fix handling of passive mode for demand circuit interfaces 2020-05-12 03:47:44 +02:00
Ondrej Zajicek (work)
f6408d99f6 RIP: Improvements to demand circuit mode
Restart iface after changing demand circuit mode during reconfiguration.
Fix next_regular interval reset during reconfiguration. Send flushing
response when iface goes down.
2020-03-14 17:08:29 +01:00
Ondrej Zajicek (work)
535cd159f2 RIP: Demand circuit support (RFC 2091) 2020-02-21 02:34:51 +01:00
Ondrej Zajicek (work)
d2a8b1912a BGP: Handle export table internally
Handle export table internally in BGP protocol instead of in
channel and put there exported route after full BGP processing.
2020-02-05 23:59:54 +01:00
Ondrej Zajicek (work)
ee13f35d34 BGP: Add counter of FSM established transitions
The counter is persistent through protocol up/down/restart events.
2019-12-03 18:24:01 +01:00
Ondrej Zajicek (work)
623e41cc50 Nest: Use 'old' route from export table
When export table is enabled for channel, then use routes from
export table as 'old' for rt_notify() notifications.
2019-10-31 01:26:40 +01:00
Ondrej Zajicek (work)
ee147fc1a5 Nest: Fix bug in export table
For regular channels do not compare src in export table, as we want to
keep here only the best (exported) route per network.
2019-10-31 01:17:34 +01:00
Ondrej Zajicek (work)
b2dbd9f0cc Nest: Fix bug in export table
Exported route may be in modified state, we need to get cached one for
rte_same() and rta_clone() to work properly.
2019-10-31 01:16:17 +01:00
Maria Matejka
a7af13730b Testing: Don't call vsnprintf with NULL format 2019-10-04 21:00:40 +02:00
Maria Matejka
e3c5cf6637 Fixed undefined behavior on signals.
The C11 specification allows only sig_atomic_t and _Atomic variable
access. All other accesses to global variables are undefined behavior.

Using int was probably OK on x86 and x86_64; yet there were some reports
from other architectures (especially some MIPS) that in rare cases,
after issuing SIGHUP, BIRD did strange things.
2019-10-04 21:00:40 +02:00
Ondrej Zajicek (work)
3cf4d4191d Static: Fix merging of static routes with different metric 2019-09-17 14:15:41 +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)
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