summaryrefslogtreecommitdiff
path: root/proto/rip
AgeCommit message (Collapse)Author
2023-04-22Socket closing has its dedicated functionMaria Matejka
2023-04-04Sockets: Unified API for main and other loopsMaria Matejka
Now sk_open() requires an explicit IO loop to open the socket in. Also specific functions for socket RX pause / resume are added to allow for BGP corking. And last but not least, socket reloop is now synchronous to resolve weird cases of the target loop stopping before actually picking up the relooped socket. Now the caller must ensure that both loops are locked while relooping, and this way all sockets always have their respective loop.
2023-04-04Propagated const through route feed routinesMaria Matejka
2023-04-04BFD notifications respect protocol loop settingsMaria Matejka
2023-04-04Interface subsystem lockingMaria Matejka
2023-02-07Merge commit '0bb04d5390f21b0c96fc4894ba5d5510c541f0ef' into HEADMaria Matejka
2023-02-02Interface updates are asynchronousMaria Matejka
Instead of propagating interface updates as they are loaded from kernel, they are enqueued and all the notifications are called from a protocol-specific event. This change allows to break the locking loop between protocols and interfaces. Anyway, this change is based on v2 branch to keep the changes between v2 and v3 smaller.
2023-01-26Object locks use eventsMaria Matejka
Instead of calling custom hooks from object locks, we use standard event sending mechanism to inform protocols about object lock changes. This is a backport from version 3 where these events are passed across threads. This implementation of object locks doesn't use mutexes to lock the whole data structure. In version 3, this data structure may get accessed from multiple threads and must be protected by mutex.
2023-01-25VRF setting reduced to one argument, using default dummy iface for default vrfMaria Matejka
2023-01-24Object locks use eventsMaria Matejka
Instead of calling custom hooks from object locks, we use standard event sending mechanism to inform protocols about object lock changes. As event sending is lockless, the unlocking protocol simply enqueues the appropriate event to the given loop when the locking is done.
2023-01-24Merge v2.0.12 into thread-nextMaria Matejka
2023-01-23Merge commit 'b28431e557c4f63923476094a919a0630001275e' into thread-nextMaria Matejka
2023-01-22VRF: Fix issues with reconfigurationOndrej Zajicek
Protocols receive if_notify() announcements that are filtered according to their VRF setting, but during reconfiguration, they access iface_list directly and forgot to check VRF setting here, which leads to all interfaces be addedd. Fix this issue for Babel, OSPF, RAdv and RIP protocols. Thanks to Marcel Menzel for the bugreport.
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-09-09Merge commit 'd2c1036a42881d413ec97203ede92a69f8cd218f' into thread-nextMaria Matejka
2022-08-18Simplified the protocol hookup code in MakefilesMaria Matejka
2022-08-05Merge branch 'backport' into thread-nextMaria Matejka
2022-08-03rip_rte_better() uses the IGP_METRIC_UNKNOWN instead of protocol-specific ↵Maria Matejka
infinity
2022-08-02Merge commit 'f0507f05ce57398e135651896dace4cb68eeed54' into thread-nextMaria Matejka
2022-06-27Fixed displaying BGP and RIP attributes after recent reworksMaria Matejka
2022-06-08Merge commit '938742decc6e1d6d3a0375dd012b75172e747bbc' into haugesundMaria Matejka
2022-06-08Merge commit '950775f6fa3d569a9d7cd05e33538d35e895d688' into haugesundMaria Matejka
There were quite a lot of conflicts in flowspec validation code which ultimately led to some code being a bit rewritten, not only adapted from this or that branch, yet it is still in a limit of a merge.
2022-05-30Merge commit 'f15f2fcee7eeb5a100bd204a0e67018e25953420' into haugesundMaria Matejka
2022-05-30Merge commit '1c30b689ddd032ef8000fb7836348a48ba3184ff' into haugesundMaria Matejka
2022-05-30Merge commit '702c04fbef222e802ca4dfac645dc75ede522db6' into haugesundMaria Matejka
2022-05-30Merge commit '337c04c45e1472d6d9b531a3c55f1f2d30ebf308' into haugesundMaria Matejka
2022-05-30Merge commit 'd8661a4397e4576ac404661b192dd99d928e7890' into haugesundMaria Matejka
2022-05-30Merge commit '17f91f9e6e70f7e3f29502e854823c0d48571eaa' into haugesundMaria Matejka
2022-05-30Merge commit '1d309c4ce6e95b68c64a8f007f6dd2f1830a5707' into haugesundMaria Matejka
2022-05-30Merge commit 'ef6a903e6f44b467f9606018446095521ad01ef1' into haugesundMaria Matejka
2022-05-30Merge commit '0d0f6554a5c233bf2bf830ae319191c4b1808d49' into haugesundMaria Matejka
2022-05-30Merge commit '98fd158e28d89f10ee7a41b4f6a14fbd0021ef35' into haugesundMaria Matejka
2022-05-30Merge commit '4a23ede2b056a41456790cc20a0c3d92a7137693' into haugesundMaria Matejka
2022-05-30Merge commit 'ebd807c0b8eb0b7a3dc3371cd4c87ae886c00885' into haugesundMaria Matejka
2022-05-30Squashing the route attribute structure into one level.Maria Matejka
For now, all route attributes are stored as eattrs in ea_list. This should make route manipulation easier and it also allows for a layered approach of route attributes where updates from filters will be stored as an overlay over the previous version.
2022-05-30Route destination field merged with nexthop attribute; splitting flowspec ↵Maria Matejka
validation result out. As there is either a nexthop or another destination specification (or othing in case of ROAs and Flowspec), it may be merged together. This code is somehow quirky and should be replaced in future by better implementation of nexthop. Also flowspec validation result has its own attribute now as it doesn't have anything to do with route nexthop.
2022-05-26Moved nexthop from struct rta to extended attribute.Maria Matejka
This doesn't do anything more than to put the whole structure inside adata. The overall performance is certainly going downhill; we'll optimize this later. Anyway, this is one of the latest items inside rta and in several commits we may drop rta completely and move to eattrs-only routes.
2022-05-04Moved route source attribute (RTS_*) to eattrsMaria Matejka
2022-05-04Removing the route scope attribute. Use custom attributes instead.Maria Matejka
The route scope attribute was used for simple user route marking. As there is a better tool for this (custom attributes), the old and limited way can be dropped.
2022-05-04Moved route preference to eattrsMaria Matejka
2022-05-04Conf: Allowing keyword redefinitionMaria Matejka
Some tokens are both keywords and symbols. For now, we allow only specific keywords to be redefined; in future, more of the keywords may be added to this category. The redefinable keywords must be specified in any .Y file as follows: toksym: THE_KEYWORD ; See proto/bgp/config.Y for an example. Also dropped a lot of unused terminals.
2022-05-04Moved advertising router info (FROM attribute) to eattrsMaria Matejka
2022-05-04Explicit definition structures of route attributesMaria Matejka
Changes in internal API: * Every route attribute must be defined as struct ea_class somewhere. * Registration of route attributes known at startup must be done by ea_register_init() from protocol build functions. * Every attribute has now its symbol registered in a global symbol table defined as SYM_ATTRIBUTE * All attribute ID's are dynamically allocated. * Attribute value custom formatting hook is defined in the ea_class. * Attribute names are the same for display and filters, always prefixed by protocol name. Also added some unit testing code for filters with route attributes.
2022-05-04Splitting route data structures out to libMaria Matejka
2022-05-04Unified attribute and filter typesMaria Matejka
This commit removes the EAF_TYPE_* namespace completely and also for route attributes, filter-based types T_* are used. This simplifies fetching and setting route attributes from filters. Also, there is now union bval which serves as an universal value holder instead of private unions held separately by eattr and filter code.
2022-05-04Protocols use EA_LITERAL_* to set attributesMaria Matejka
2022-04-13RIP: fixed the EA_RIP_FROM attributeMaria Matejka
The interface pointer was improperly converted to u32 and back. Fixing this by explicitly allocating an adata structure for it. It's not so memory efficient, we'll optimize this later.
2022-04-06Protocols have their own explicit init routinesMaria Matejka
2022-04-06Slab allocator can free the blocks without knowing the parent structureMaria Matejka
2021-11-22Route sources have an explicit ownerMaria Matejka
This commit prevents use-after-free of routes belonging to protocols which have been already destroyed, delaying also all the protocols' shutdown until all of their routes have been finally propagated through all the pipes down to the appropriate exports. The use-after-free was somehow hypothetic yet theoretically possible in rare conditions, when one BGP protocol authors a lot of routes and the user deletes that protocol by reconfiguring in the same time as next hop update is requested, causing rte_better() to be called on a not-yet-pruned network prefix while the owner protocol has been already freed. In parallel execution environments, this would happen an inter-thread use-after-free, causing possible heisenbugs or other nasty problems.