summaryrefslogtreecommitdiff
path: root/nest/rt-attr.c
AgeCommit message (Collapse)Author
2023-10-04L3VPN: BGP/MPLS VPNs using MPLS backboneOndrej Zajicek
The L3VPN protocol implements RFC 4364 BGP/MPLS VPNs using MPLS backbone. It works similarly to pipe. It connects IP table (one per VRF) with (global) VPN table. Routes passed from VPN table to IP table are stripped of RD and filtered by import targets, routes passed in the other direction are extended with RD, MPLS labels and export targets in extended communities. A separate MPLS channel is used to announce MPLS routes for the labels.
2023-10-04MPLS subsystemOndrej Zajicek
The MPLS subsystem manages MPLS labels and handles their allocation to MPLS-aware routing protocols. These labels are then attached to IP or VPN routes representing label switched paths -- LSPs. There was already a preliminary MPLS support consisting of MPLS label net_addr, MPLS routing tables with static MPLS routes, remote labels in next hops, and kernel protocol support. This patch adds the MPLS domain as a basic structure representing local label space with dynamic label allocator and configurable label ranges. To represent LSPs, allocated local labels can be attached as route attributes to IP or VPN routes with local labels as attributes. There are several steps for handling LSP routes in routing protocols -- deciding to which forwarding equivalence class (FEC) the LSP route belongs, allocating labels for new FECs, announcing MPLS routes for new FECs, attaching labels to LSP routes. The FEC map structure implements basic code for managing FECs in routing protocols, therefore existing protocols can be made MPLS-aware by adding FEC map and delegating most work related to local label management to it.
2023-10-02Nest: Expand rte_src.private_id to u64Ondrej Zajicek
In general, private_id is sparse and protocols may want to map some internal values directly into it. For example, L3VPN needs to map VPN route discriminators to private_id. OTOH, u32 is enough for global_id, as these identifiers are dense.
2023-09-26Basic route aggregationIgor Putovny
Add a new protocol offering route aggregation. User can specify list of route attributes in the configuration file and run route aggregation on the export side of the pipe protocol. Routes are sorted and for every group of equivalent routes new route is created and exported to the routing table. It is also possible to specify filter which will run for every route before aggregation. Furthermore, it will be possible to set attributes of new routes according to attributes of the aggregated routes. This is a work in progress. Original work by Igor Putovny, subsequent cleanups and finalization by Maria Matejka.
2023-01-03Nest: Fix leaking internal attributes in RIP and BabelOndrej Zajicek
During backporting attribute changes from 3.0-branch, some internal attributes (RIP iface and Babel seqno) leaked to 'show route all' output. Allow protocols to hide specific attributes with GA_HIDDEN value. Thanks to Nigel Kukard for the bugreport.
2022-04-06Unsetting route attributes without messing with type systemMaria Matejka
2022-04-06Eattr flags (originated and fresh) get their own struct fieldsMaria Matejka
2022-04-06Slab allocator can free the blocks without knowing the parent structureMaria Matejka
2021-10-13Dropping the RTS_DUMMY temporary route storage.Maria Matejka
Kernel route sync is done by other ways now and this code is not used currently.
2021-10-13Extended route attributes may include also pointersMaria Matejka
2021-10-13Route: moved rte_src pointer from rta to rteMaria Matejka
It is an auxiliary key in the routing table, not a route attribute.
2021-10-13Preference moved to RTA and set explicitly in protocolsMaria Matejka
2021-03-30Allocation of ea_list in one contiguous memory blockMaria Matejka
This saves some bytes of memory for complex ea's.
2020-11-24Some minor sl_allocz() cleanupsOndrej Zajicek (work)
2020-05-01Nest: Added const to ea_show just to declare that this shouldn't really ↵Maria Matejka
change anything
2020-05-01Nest: Several assumptions to tame the static analyzerMaria Matejka
2019-07-10Merge branch 'master' into mq-filter-stackMaria Matejka
2019-07-02Netlink: Handle alien routes with unsorted nexthopsOndrej Zajicek (work)
Nest requires that nexthops are sorted, the kernel protocol have to ensure that for alien routes.
2019-03-18Merge branch 'master' into HEADMaria Matejka
2019-03-14Nest: Update handling of temporary attributesOndrej Zajicek (work)
The temporary atttributes are no longer removed by ea_do_prune(), but they are undefined by store_tmp_attrs() protocol hooks. This fixes several bugs where temporary attributes were removed when they should not or not removed when they should be. The flag EAF_TEMP is no longer needed and was removed. Update all protocol make_tmp_attrs() / store_tmp_attrs() hooks to use helper functions and to handle unset attributes properly. Also fix some related bugs like improper handling of empty eattr list.
2019-02-20Filter refactoring: dropped the recursion from the interpreterMaria Matejka
This is a major change of how the filters are interpreted. If everything works how it should, it should not affect you unless you are hacking the filters themselves. Anyway, this change should make a huge improvement in the filter performance as previous benchmarks showed that our major problem lies in the recursion itself. There are also some changes in nest and protocols, related mostly to spreading const declarations throughout the whole BIRD and also to refactored dynamic attribute definitions. The need of these came up during the whole work and it is too difficult to split out these not-so-related changes.
2018-12-18Nest: Handle labels_orig correctly in attribute cacheOndrej Zajicek (work)
2018-12-16Nest: Fix handling of ECMP next hop flagsOndrej Zajicek (work)
Flag field was not copied when next hop was cached.
2018-12-06Custom route attributesMaria Matejka
For local route marking purposes, local custom route attributes may be defined. These attributes are seamlessly stripped after export filter to every real protocol like Kernel, BGP or OSPF, they however pass through pipes. We currently allow at most 256 custom attributes. This should be much faster than currently used bgp communities for marking routes.
2018-11-05Nest: Fix crash in rta_show() for RPKI and Babel routesOndrej Zajicek (work)
Some new route source values did not have associated string in rta_show(), which might caused crash in some cases.
2018-05-30Nest: Removing separate tmpa from route propagationJan Maria Matejka
This is a fundamental change of an original (1999) concept of route processing inside BIRD. During import/export, there was a temporary ea_list created which was to be used instead of the another one inside the route itself. This led to some confusion, quirks, and strange filter code that handled extended route attributes. Dropping it now. The protocol interface has changed in an uniform way -- the `struct ea_list *attrs` argument has been removed from store_tmp_attrs(), import_control(), rt_notify() and get_route_info().
2018-05-29Protocol: Introducing an enum protocol_classJan Maria Matejka
This supersedes the EAP_* constants.
2018-02-07Nest: Trivial whitespace cleanupOndrej Zajicek (work)
2017-07-04Implement onlink flag for nexthopsOndrej Zajicek (work)
Add proper support for per-nexthop onlink flag in routes to handle next hop addresses that are not covered by interface IP ranges. Supported by kernel and static protocols. Thanks to Vincent Bernat for the idea.
2017-03-09Nest: Minor fixes in show routeOndrej Zajicek (work)
2017-02-24Nexthop: Fixed hostentryJan Moskyto Matejka
2017-02-20Several minor fixesOndrej Zajicek (work)
2016-12-22Netlink: MPLS routes in kernelJan Moskyto Matejka
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-22Static: Protocol rework wrt. struct nexthop changes; MPLS label supportJan Moskyto Matejka
2016-12-22Nexthop: Support for label stack in nestJan Moskyto Matejka
2016-12-22Removing (struct rta)->cast. Never used.Jan Moskyto Matejka
2016-12-22Merged multipath and single-path data structures.Jan Moskyto Matejka
Dropped struct mpnh and mpnh_*() Now struct nexthop exists, nexthop_*(), and also included struct nexthop into struct rta. Also converted RTD_DEVICE and RTD_ROUTER to RTD_UNICAST. If it is needed to distinguish between these two cases, RTD_DEVICE is equivalent to IPA_ZERO(a->nh.gw), RTD_ROUTER is then IPA_NONZERO(a->nh.gw). From now on, we also explicitely want C99 compatible compiler. We assume that this 20-year norm should be known almost everywhere.
2016-12-07BGP redesignOndrej Zajicek (work)
Integrated and extensible BGP with generalized AFI handling, support for IPv4+IPv6 AFI and unicast+multicast SAFI.
2016-11-08Merge branch 'master' into int-newOndrej Zajicek (work)
2016-11-08Merge tag 'v1.6.2' into int-newOndrej Zajicek (work)
2016-11-01Build: switch on -Wextra, get rid of most of the warningsJan Moskyto Matejka
There are several unresolved -Wmissing-field-initializers on older versions of GCC than 5.1, all of them false positive.
2016-10-03BGP: Support for large communitiesOndrej Zajicek (work)
Add support for large communities (draft-ietf-idr-large-community), 96bit alternative to RFC 1997 communities. Thanks to Matt Griswold for the original patch.
2016-09-14Nest: Keep multipath next hops sortedOndrej Zajicek (work)
2016-07-19Babel: Documentation updatesOndrej Zajicek (work)
This updates the documentation to correctly mention Babel when protocols are listed, and adds examples and route attribute documentation to the Babel section of the docs. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
2016-05-13Merge branch 'int-new' of gitlab.labs.nic.cz:labs/bird into int-newJan Moskyto Matejka
2016-05-13Hash: Fix of previous commitJan Moskyto Matejka
2016-05-12Make int-new compilable againOndrej Zajicek (work)
2016-05-12Merge remote-tracking branch 'origin/int-new' into int-newOndrej Zajicek (work)
2016-05-12Merge remote-tracking branch 'origin/master' into int-newOndrej Zajicek (work)
2016-05-12Hash: fixed rta hashing wrt. structure paddingJan Moskyto Matejka