summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-19Babel: Update RFC referencesOndrej Zajicek
2023-02-19Conf: Fix too early free of old configurationOndrej Zajicek
The change 371eb49043d225d2bab8149187b813a14b4b86d2 introduced early free of old_config. Unfortunately, it did not properly check whether it is not still in use (blocked by obstacle during reconfiguration). Fix that. It also means that we still could have a short peak when three configs are in use (when a new reconfig is requeste while the previous one is still active).
2023-02-14Babel: Keep separate auth PC counters for unicast and multicastToke Høiland-Jørgensen
The babel protocol normally sends all its messages as multicast packets, but the protocol specification allows most messages to be sent as either unicast or multicast, and the two can be mixed freely. In particular, the babeld implementation can be configured to unicast updates to all peers instead of sending them as unicast. Daniel discovered that this can cause problems with the packet counter checks in the MAC extension due to packet reordering. This happens on WiFi networks where clients have power save enabled (which is quite common in infrastructure networks): in this case, the access point will buffer all multicast traffic and only send it out along with its beacons, leading to a maximum buffering in default Linux-based access point configuration of up to 200 ms. This means that a Babel sender that mixes unicast and multicast messages can have the unicast messages overtake the multicast messages because of this buffering; when authentication is enabled, this causes the receiver to discard the multicast message when it does arrive because it now has a packet counter value less than the unicast message that arrived before it. Daniel observed that this happens frequently enough that Babel ceases to work entirely when runner over a WiFi network. The issue has been described in draft-ietf-babel-mac-relaxed, which is currently pending RFC publication. That also describes two mitigation mechanisms: Keeping separate PC counters for unicast and multicast, and using a reorder window for PC values. This patch implements the former as that is the simplest, and resolves the particular issue seen on WiFi. Thanks to Daniel Gröber for the bugreport. Minor changes from committer.
2023-02-14Babel: Implement IPv4 via IPv6 extension (RFC 9229)Andreas Rammhold
The patch implements an IPv4 via IPv6 extension (RFC 9229) to the Babel routing protocol (RFC 8966) that allows annoncing routes to an IPv4 prefix with an IPv6 next hop, which makes it possible for IPv4 traffic to flow through interfaces that have not been assigned an IPv4 address. The implementation is compatible with the current Babeld version. Thanks to Toke Høiland-Jørgensen for early review on this work. Minor changes from committer.
2023-02-07Protocol shutdown/restart from limits is respecting the loopsMaria Matejka
2023-02-07Merge commit '0bb04d5390f21b0c96fc4894ba5d5510c541f0ef' into HEADMaria Matejka
2023-02-07BGP: opening and closing listening socket asynchronouslyMaria Matejka
2023-02-03Documentation: Adding roadmap as decided in January 2023Maria Matejka
2023-02-02Macro: stringifyMaria Matejka
2023-02-02Lists: fixed bugs in expensive checks in quirky usecasesMaria 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-02-02Proto: Adding a list of associated neighborsMaria Matejka
This makes for safer and faster pruning and notifying as protocol now on its shutdown prunes only its neighbors and nothing else.
2023-02-02Typed lists: shortcut for simple nodesMaria Matejka
2023-02-02Moved interface list flush to device protocol cleanup hook.Maria Matejka
The interface list must be flushed when device protocol is stopped. This was done in a hardcoded specific hook inside generic protocol routines. The cleanup hook was originally used for table reference counting late cleanup, yet it can be also simply used for prettier interface list flush.
2023-02-01Build: Partial revert of one of previous changesOndrej Zajicek
There are many compatibility issues with echo -e, scratch that.
2023-02-01Build: Minor improvement to build outputOndrej Zajicek
2023-02-01Nest: Minor cleanup in buildsystemOndrej Zajicek
There ware missing dependencies for proto-build.c generation, which sometimes lead to failed builds, and ignores changes in the set of built protocols. Fix that, and also improve formatting of proto-build.c
2023-01-31Babel: Initialise source seqno from incoming messageToke Høiland-Jørgensen
When creating a new babel_source object we initialise the seqno to 0. The caller will update the source object with the right metric and seqno value, for both newly created and old source objects. However if we initialise the source object seqno to 0 that may actually turn out to be a valid (higher) seqno than the one in the routing table, because of seqno wrapping. In this case the source metric will not be set properly, which breaks feasibility tracking for subsequent updates. To fix this, add a new initial_seqno argument to babel_get_source() which is used when allocating a new object, and set that to the seqno value of the update we're sending. Thanks to Juliusz Chroboczek for the bugreport.
2023-01-30Babel: Improve clarity of unfeasible update handling.Ondrej Zajicek
Add a comment and (unnecessary) check to make correctness obvious.
2023-01-30Babel: Fix missing modulo comparison of seqnosToke Høiland-Jørgensen
Juliusz noticed there were a couple of places we were doing straight inequality comparisons of seqnos in Babel. This is wrong because seqnos can wrap: so we need to use the modulo-64k comparison function for these cases as well. Introduce a strict-inequality version of the modulo-comparison for this purpose.
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-24Merge commit '3186ffe79714a48542d5ad61a94c81216b522fd0' into thread-nextMaria Matejka
2023-01-24Merge commit '6bb992cb04926895be57dc97e7d569ea15a07db1' into thread-nextMaria Matejka
2023-01-24Merge commit '9dc9124c' into thread-nextMaria Matejka
2023-01-24Revert "Filter: Allow setting the 'onlink' route attribute in filters"Maria Matejka
This reverts commit 7144c9ca46f092da33a4e051bbce8f973a3bd8c4. The onlink attribute implementation collides with the nexthop attribute behavior in v3; keeping it aside until finding out how to reimplement it correctly.
2023-01-23Merge commit '928a1cb034e6f9e8edcdd1dc07264cd703e00827' into thread-nextMaria Matejka
2023-01-23Merge commit '7fb23041a52d01754c53ba963e2282e524813364' into thread-nextMaria Matejka
2023-01-23Merge commit 'd1cd5e5a63b2256eb71661f7438537e4ded7b01a' into thread-nextMaria Matejka
2023-01-23Merge commit 'b28431e557c4f63923476094a919a0630001275e' into thread-nextMaria Matejka
2023-01-23Merge commit 'd3f50ede127df338f575e188566035b2a46cf6c6' into thread-nextMaria Matejka
2023-01-23Merge commit '6d1ae197d189d50e60279796441c6e74272ddc54' into thread-nextMaria Matejka
2023-01-23Merge commit '8b06a4d8af46511f0f8dbb8905afa88590a831b6' into thread-nextMaria Matejka
2023-01-23Small fix of indentingAlexander Zubkov
2023-01-23NEWS and version updatev2.0.12Ondrej Zajicek
2023-01-22BFD: Improve incoming packet matchingOndrej Zajicek
For active sessions, ignore received packets with zero local id and mismatched remote id. That forces a session timeout instead of an immediate session restart. It makes BFD sessions more resilient to packet spoofing. Thanks to André Grüneberg for the suggestion.
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-22Merge commit '2b7643e1f8ecb0bd4cf9af4183b4fd53b655d19c' into thread-nextMaria Matejka
2023-01-22Added test case for switch bug fixed in e20bef69ccc4a85ef62359ee539c9db2dbe09127Maria Matejka
2023-01-21Merge commit '1e47b9f203aaaad0fb658d40a1670f1d0437f1f8' into thread-nextMaria Matejka
2023-01-21Merge commit 'e48f898fdaf06b61754ae520410729a9984ab65b' into thread-nextMaria Matejka
2023-01-21Merge commit 'a80cd4707464cedb526eb72e7704b097af20beb7' into thread-nextMaria Matejka
2023-01-21Merge commit '3859e4efc1597368df647323c5a3cc1771cb64ca' into thread-nextMaria Matejka
2023-01-21Merge commit 'e80156d9363a594ff23524f56d59f0eee160859d' into thread-nextMaria Matejka
2023-01-21Adding forgotten pthread.h #include in io-loop.h (breaks at openbsd 7.1)Maria Matejka
2023-01-21Merge commit 'a50d2fa65f3350ee55f5106b87a884d1b98e7761' into thread-nextMaria Matejka
2023-01-21Merge commit '543c8ba0971e91da3fe507dbfc1e1f9b556642b1' into thread-nextMaria Matejka
2023-01-20Fixed various build problems on FreeBSD and/or CLangMaria Matejka