summaryrefslogtreecommitdiff
path: root/proto/babel
AgeCommit message (Collapse)Author
2020-04-09Configuration strings are constant.Maria Matejka
This is merely a const propagation. There was no problem in there.
2019-07-03Dynamic attributes definition split whether it is bitmask or not.Maria Matejka
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 + Config: Fix bugs, tests and split symbols by typeMaria Matejka
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-14Doc: Rename code documentation files back to DocOndrej Zajicek (work)
2018-12-04Terminology cleanup: The import_control hook is now called preexport.Jan Maria Matejka
Once upon a time, far far away, there were the old Bird developers discussing what direction of route flow shall be called import and export. They decided to say "import to protocol" and "export to table" when speaking about a protocol. When speaking about a table, they spoke about "importing to table" and "exporting to protocol". The latter terminology was adopted in configuration, then also the bird CLI in commit ea2ae6dd0 started to use it (in year 2009). Now it's 2018 and the terminology is the latter. Import is from protocol to table, export is from table to protocol. Anyway, there was still an import_control hook which executed right before route export. One thing is funny. There are two commits in April 1999 with just two minutes between them. The older announces the final settlement on config terminology, the newer uses the other definition. Let's see their commit messages as the git-log tool shows them (the newer first): commit 9e0e485e50ea74c4f1c5cb65bdfe6ce819c2cee2 Author: Martin Mares <mj@ucw.cz> Date: Mon Apr 5 20:17:59 1999 +0000 Added some new protocol hooks (look at the comments for better explanation): make_tmp_attrs Convert inline attributes to ea_list store_tmp_attrs Convert ea_list to inline attributes import_control Pre-import decisions commit 5056c559c4eb253a4eee10cf35b694faec5265eb Author: Martin Mares <mj@ucw.cz> Date: Mon Apr 5 20:15:31 1999 +0000 Changed syntax of attaching filters to protocols to hopefully the final version: EXPORT <filter-spec> for outbound routes (i.e., those announced by BIRD to the rest of the world). IMPORT <filter-spec> for inbound routes (i.e., those imported by BIRD from the rest of the world). where <filter-spec> is one of: ALL pass all routes NONE drop all routes FILTER <name> use named filter FILTER { <filter> } use explicitly defined filter For all protocols, the default is IMPORT ALL, EXPORT NONE. This includes the kernel protocol, so that you need to add EXPORT ALL to get the previous configuration of kernel syncer (as usually, see doc/bird.conf.example for a bird.conf example :)). Let's say RIP to this almost 19-years-old inconsistency. For now, if you import a route, it is always from protocol to table. If you export a route, it is always from table to protocol. And they lived happily ever after.
2018-11-28Nest: Do not hard-reset interface when preferred address is changedOndrej Zajicek (work)
Modify protocols to use preferred address change notification instead on depending on hard-reset of interfaces in that case, and remove hard-reset in that case. This avoids issue when e.g. IPv6 protocol restarts interface when IPv4 preferred address changed (as hard-reset is unavoidable and common for whole iface). The patch also fixes a bug when removing last address does not send preferred address change notification.
2018-10-01Lib: Add and use ev_new_init()Ondrej Zajicek (work)
2018-07-03Cleanup some warningsOndrej Zajicek (work)
2018-06-26Doc: renamed progdoc files Doc -> progdoc to fix collision with doc/ folder ↵Maria Matejka
on case-insensitive filesystems
2018-06-26Config: Dropping CF_ADDTO.Jan Maria Matejka
2018-06-19Merge branch 'int-new' into HEADJan Maria Matejka
2018-06-13Babel: Fix handling of missing IPv4 next hopsOndrej Zajicek (work)
In case of missing IPv4 next hop, we should skip such routes on transmit and ignore such routes on receive. Thanks to Julian Schuh for the bugreport and Toke Hoiland-Jorgensen for the original patch.
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-05-24Do not initialize route metrics in import_control hookOndrej Zajicek (work)
During route export, the receiving protocol often initialized route metrics to default value in its import_control hook before export filter was executed. This is inconsistent with the expectation that an export filter would process the same route as one in the routing table and it breaks setting these metrics before (e.g. for static routes directly in static protocol). The patch removes the initialization of route metrics in import_control hook, the default values are already handled in rt_notify hook called after export filters. The patch also changed the behavior of OSPF to keep metrics when a route is reannounced between OSPF instances (to be consistent with other protocols) and the behavior when both ospf_metric1 and ospf_metric2 are specified (to have more expected behavior).
2018-05-03Babel: Add option to randomize router IDOndrej Zajicek (work)
When a Babel node restarts, it loses its sequence number, which can cause its routes to be rejected by peers until the state is cleared out by other nodes in the network (which can take on the order of minutes). There are two ways to fix this: Having stable storage to keep the sequence number across restarts, or picking a different router ID each time. This implements the latter, by introducing a new option that will cause BIRD to randomize a high 32 bits of router ID every time it starts up. This avoids the problem at the cost of not having stable router IDs in the network. Thanks to Toke Hoiland-Jorgensen for the patch.
2018-05-03Babel: Fix type of route entry router IDOndrej Zajicek (work)
The router ID being assigned to routes was a uint, which discards the upper 32 bits. This also has the nice side effect of echoing the wrong router ID back to other routers. Thanks to Toke Hoiland-Jorgensen for the patch.
2018-03-07Merge branch 'master' into int-newOndrej Zajicek (work)
2018-03-07Babel: Fix build with restricted protocol setOndrej Zajicek (work)
All keywords used in Babel config have to be declared locally. Thanks to Leo Vandewoestijne for the bugreport.
2018-02-13Babel: Fix accidental bitwise or assignmentOndrej Zajicek (work)
Fix an accidental bitwise or assignment that was supposed to be a comparison. Thanks to Toke Hoiland-Jorgensen for the patch.
2018-02-13Babel: Add source-specific routing supportOndrej Zajicek (work)
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.
2017-12-07Merge commit '1e8721e2aeccfbc3f533e8b8abc07582cee77e9a' into int-newOndrej Zajicek (work)
2017-12-07Merge commit '7b2c5f3d2826e3175bf31b1c36056c9efc587a2b' into int-newOndrej Zajicek (work)
2017-12-07Timers: Revert temporary names and remove old timer.hOndrej Zajicek (work)
2017-12-07Babel: More changes and bugfixesOndrej Zajicek (work)
Several changes and bugfixes in Babel, namely: - Exported route parameters stored directly in route table entry - Exported non-babel routes no longer stored in per-entry route list - Route update, selection and retraction simplified and fixed - Route feasibility is evalualated per update and stored with route - Unreachable route handling fixed, based on hold interval - Added 'show babel routes' command Overall, it fixes some issues with proper propagation of triggered updates, making Babel convergence after topology change almost instant.
2017-12-07Babel: Fix handling of seqno requestsOndrej Zajicek (work)
Old behavior has several deficiencies compared to standard behavior (no triggered updates for replies, no retransmissions, ...).
2017-12-07Babel: Fix handling of IPv4 retractionsOndrej Zajicek (work)
Babel TLV parsing code rejected IPv4 retractions without next-hop, although next-hop is needed just for regular updates.
2017-12-07Babel: Remove babel_proto ptr from babel_entryOndrej Zajicek (work)
2017-12-07Babel: Fix hello timeout for short hello intervalsOndrej Zajicek (work)
2017-12-07Babel: Revamp cost computation and run route selection when cost changeOndrej Zajicek (work)
Also fix several minor bugs and add 'limit' option for k-out-of-j link sensing strategy. Change default from 8-of-16 to 12-of-16. Change IHU expiry factor from 1.5 to 3.5 (as in RFC 6126).
2017-12-07Babel: Fix unicast seqno requestsOndrej Zajicek (work)
2017-12-07Babel: Avoid batch seqno updatesOndrej Zajicek (work)
2017-12-07Babel: Fix Hello and IHU expirationOndrej Zajicek (work)
2017-12-07Babel: Update to new timersOndrej Zajicek (work)
2017-12-07Timers: Replace old timers with microsecond timersOndrej Zajicek (work)
The old timer interface is still kept, but implemented by new timers. The plan is to switch from the old inteface to the new interface, then clean it up.
2017-12-07Nest: Maintain separate IPv4, IPv6 and LLv6 preferred addressesOndrej Zajicek (work)
Also redesign preferred address selection and update protocols to use appropriate preferred address. Based on a previous work by Jan Maria Matejka.
2017-11-28Babel: Parse flags in Hello TLVOndrej Zajicek (work)
RFC6126bis introduces a flags field for the Hello TLV, and adds a unicast flag that is used to signify that a hello was sent as unicast. This adds parsing of the flags field and ignores such unicast hellos, which preserves compatibility until we can add a proper implementation of the unicast hello mechanism. Thanks to Toke Hoiland-Jorgensen for the patch.
2017-10-17Babel: Interface address irrelevant for interface pattern matching.Jan Maria Matejka
2017-09-19BGP: Shutdown communication (RFC 8203)Ondrej Zajicek (work)
The patch implements BGP Administrative Shutdown Communication (RFC 8203) allowing BGP operators to pass messages related to BGP session administrative shutdown/restart. It handles both transmit and receive of shutdown messages. Messages are logged and may be displayed by show protocol all command. Thanks to Job Snijders for the basic patch.
2017-09-06Basic VRF supportOndrej Zajicek (work)
Add basic VRF (virtual routing and forwarding) support. Protocols can be associated with VRFs, such protocols will be restricted to interfaces assigned to the VRF (as reported by Linux kernel) and will use sockets bound to the VRF. E.g., different multihop BGP instances can use diffent kernel routing tables to handle BGP TCP connections. The VRF support is preliminary, currently there are several limitations: - Recent Linux kernels (4.11) do not handle correctly sockets bound to interaces that are part of VRF, so most protocols other than multihop BGP do not work. This will be fixed by future kernel versions. - Neighbor cache ignores VRFs. Breaks config with the same prefix on local interfaces in different VRFs. Not much problem as single hop protocols do not work anyways. - Olock code ignores VRFs. Breaks config with multiple BGP peers with the same IP address in different VRFs. - Incoming BGP connections are not dispatched according to VRFs. Breaks config with multiple BGP peers with the same IP address in different VRFs. Perhaps we would need some kernel API to read VRF of incoming connection? Or probably use multiple listening sockets in int-new branch. - We should handle master VRF interface up/down events and perhaps disable associated protocols when VRF goes down. Or at least disable associated interfaces. - Also we should check if the master iface is really VRF iface and not some other kind of master iface. - BFD session request dispatch should be aware of VRFs. - Perhaps kernel protocol should read default kernel table ID from VRF iface so it is not necessary to configure it. - Perhaps we should have per-VRF default table.
2017-06-14Babel: Fix pointer arithmetic in subtlv parsingOndrej Zajicek (work)
The subtlv parsing code was doing byte-based arithmetic with non-void pointers, causing it to read beyond the end of the packet. Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
2017-06-09Babel: Parse sub-TLVs and skip TLVs with mandatory sub-TLVOndrej Zajicek (work)
RFC6126bis formally introduces sub-TLVs to the Babel protocol, including mandatory sub-TLVs. This adds support for parsing sub-TLVs to the Babel protocol and skips TLVs that contain mandatory sub-TLVs, as per the spec. For details, see section 4.4 of https://tools.ietf.org/html/draft-ietf-babel-rfc6126bis-02 Thanks to Toke Høiland-Jørgensen <toke@toke.dk> for the patch.
2017-06-09Babel: Implement IPv6 prefix compression on outgoing updatesOndrej Zajicek (work)
Previously, the Babel protocol would never use prefix compression on outgoing updates (but would parse it on incoming ones). This adds compression of IPv6 addresses of outgoing updates. The compression only works to the extent that the FIB is walked in lexicographic order; i.e. a prefix is only compressed if it shares bytes with the previous prefix in the same packet. Thanks to Toke Høiland-Jørgensen <toke@toke.dk> for the patch.
2017-06-08Babel: Add support for dual-stack IPv4/IPv6 operationOndrej Zajicek (work)
This adds support for dual-stack v4/v6 operation to the Babel protocol. Routing messages will be exchanged over IPv6, but IPv4 routes can be carried in the messages being exchanged. This matches how the reference Babel implementation (babeld) works. The nexthop address for v4 can be configured per interface, and will default to the first available IPv4 address on the given interface. For symmetry, a configuration option to configure the IPv6 nexthop address is also added. Thanks to Toke Høiland-Jørgensen <toke@toke.dk> for the patch.
2017-02-22Babel post-merge fixesJan Moskyto Matejka
2016-12-13Minor cleanupsOndrej Zajicek (work)
2016-12-10Babel: Update to integrated branchOndrej Zajicek (work)