aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/receive.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* various: nits from willyJason A. Donenfeld2016-11-151-1/+1
|
* debug: cleanup skb printingJason A. Donenfeld2016-11-151-42/+25
|
* socket: keep track of src address in sending packetsJason A. Donenfeld2016-11-151-42/+36
|
* send: simplify handshake initiation queueing and introduce lockJason A. Donenfeld2016-11-071-1/+1
|
* debug: support dynamic debug on skb addrJason A. Donenfeld2016-11-061-4/+4
|
* receive: always send confirmation, even if queue is emptyJason A. Donenfeld2016-10-191-1/+5
|
* timers: only have initiator rekeyJason A. Donenfeld2016-10-191-3/+26
| | | | | | | | | 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.
* debug: keep alive -> keepaliveJason A. Donenfeld2016-10-191-1/+1
|
* Rework headers and includesJason A. Donenfeld2016-09-291-2/+3
|
* send: properly encapsulate ECNJason A. Donenfeld2016-08-291-2/+13
| | | | We're not leaking the DSCP, but we do deal with ECN.
* receive: assume we usually succeed with userspaceexperimental-0.0.20160711Jason A. Donenfeld2016-07-101-1/+1
|
* receive: no need to test for !lenJason A. Donenfeld2016-07-101-1/+1
|
* persistent keepalive: use authenticated keepalivesJason A. Donenfeld2016-07-101-0/+2
|
* timers: rename *authorized* functions to *authenticated*Jason A. Donenfeld2016-07-081-2/+2
|
* persistent keepalive: add kernel mechanismJason A. Donenfeld2016-07-081-1/+1
|
* receive: protect against impossible conditionsJason A. Donenfeld2016-07-031-0/+4
| | | | | | | | | | It should never be the case that skb->head + skb->transport_header - skb->data is greater than 2^16, but in case the kernel network stack borks this at some point in the future, we don't want this to slyly introduce a vulnerability into WireGuard. Further, really smart compilers might be able to make deductions about data_offset, and optimize accordingly.
* receive: error conditions are unlikelyJason A. Donenfeld2016-07-011-3/+3
|
* Initial commitJason A. Donenfeld2016-06-251-0/+301