aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/timers.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* timers: clear send_keepalive timer on sending handshake responseJason A. Donenfeld2018-05-191-0/+1
| | | | | | We reorganize this into also doing so on sending keepalives itself, which means the state machine is much more consistent, even if this was already implied.
* global: year bumpJason A. Donenfeld2018-01-031-1/+1
|
* global: add SPDX tags to all filesGreg Kroah-Hartman2017-12-091-1/+4
| | | | | | | | | | | | | It's good to have SPDX identifiers in all files as the Linux kernel developers are working to add these identifiers to all files. Update all files with the correct SPDX license identifier based on the license text of the project or based on the license in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Modified-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: use _WG prefix for include guardsJason A. Donenfeld2017-10-031-3/+3
| | | | Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
* timers: convert to use netif_runningJason A. Donenfeld2017-09-241-3/+2
|
* timers: rename confusingly named functions and variablesJason A. Donenfeld2017-08-041-1/+1
| | | | Suggested-by: Mathias Hall-Andersen <mathias@hall-andersen.dk>
* timers: use simpler uninit sync techniqueJason A. Donenfeld2017-02-071-1/+0
|
* Update copyrightJason A. Donenfeld2017-01-101-1/+1
|
* headers: cleanup noticesJason A. Donenfeld2016-11-211-1/+1
|
* timers: only have initiator rekeyJason A. Donenfeld2016-10-191-2/+0
| | | | | | | | | If it's time to rekey, and the responder sends a message, the initator will begin the rekeying when sending his response message. In the worst case, this response message will actually just be the keepalive. This generally works well, with the one edge case of the message arriving less than 10 seconds before key expiration, in which the keepalive is not sufficient. In this case, we simply rehandshake immediately.
* timers: always delay handshakes for responderJason A. Donenfeld2016-10-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the prior behavior, when sending a packet, we checked to see if it was about time to start a new handshake, and if we were past a certain time, we started it. For the responder, we made that time a bit further in the future than for the initiator, to prevent the thundering herd problem of them both starting at the same time. However, this was flawed. If both parties stopped communicating after 2.2 minutes, and then one party decided to initiate a TCP connection before the 3 minute mark, the currently open session would be used. However, because it was after the 2.2 minute mark, both peers would try to initiate a handshake upon sending their first packet. The errant flow was as follows: 1. Peer A sends SYN. 2. Peer A sees that his key is getting old and initiates new handshake. 3. Peer B receives SYN and sends ACK. 4. Peer B sees that his key is getting old and initiates new handshake. Since these events happened after the 2.2 minute mark, there's no delay between handshake initiations, and problems begin. The new behavior is changed to: 1. Peer A sends SYN. 2. Peer A sees that his key is getting old and initiates new handshake. 3. Peer B receives SYN and sends ACK. 4. Peer B sees that his key is getting old and schedules a delayed handshake for 12.5 seconds in the future. 5. Peer B receives handshake initiation and cancels scheduled handshake.
* persistent keepalive: use authenticated keepalivesJason A. Donenfeld2016-07-101-1/+1
|
* timers: rename *authorized* functions to *authenticated*Jason A. Donenfeld2016-07-081-1/+1
|
* persistent keepalive: add kernel mechanismJason A. Donenfeld2016-07-081-0/+1
|
* Initial commitJason A. Donenfeld2016-06-251-0/+19