aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/send.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* noise: infer initiator or not from handshake stateJason A. Donenfeld2017-08-041-1/+1
| | | | Suggested-by: Mathias Hall-Andersen <mathias@hall-andersen.dk>
* timers: rename confusingly named functions and variablesJason A. Donenfeld2017-08-041-1/+1
| | | | Suggested-by: Mathias Hall-Andersen <mathias@hall-andersen.dk>
* send: use skb_queue_empty where appropriateSamuel Holland2017-07-201-3/+3
| | | | Signed-off-by: Samuel Holland <samuel@sholland.org>
* global: use pointer to net_deviceJason A. Donenfeld2017-07-201-5/+5
| | | | | | DaveM prefers it to be this way per [1]. [1] http://www.spinics.net/lists/netdev/msg443992.html
* send: orphan skbs when buffering longtermJason A. Donenfeld2017-07-201-1/+7
| | | | | | | | | Otherwise we quickly use up all of a socket's memory, which prevents a socket from sending packets to other interfaces. This also has the nice effect of letting TCP connections continue to attempt to begin, with the older ones being naturally rotated out and freed, so when a connection finally is made, only the later TCP connections are attempted, not the ones that would already have timed out.
* timers: reset retry-attempt counter when not retryingJason A. Donenfeld2017-05-311-3/+6
|
* debug: print interface name in dmesgJason A. Donenfeld2017-05-311-4/+4
|
* style: spaces after for loopsJason A. Donenfeld2017-05-301-1/+1
|
* handshake: process in parallelJason A. Donenfeld2017-05-301-1/+1
|
* data: cleanup parallel workqueue and use two max_activeJason A. Donenfeld2017-04-081-1/+1
|
* data: simplify flowJason A. Donenfeld2017-04-041-2/+2
|
* locking: always use _bhJason A. Donenfeld2017-04-041-10/+9
| | | | | All locks are potentially between user context and softirq, which means we need to take the _bh variant.
* data: big refactoringJason A. Donenfeld2017-03-201-3/+6
|
* Update copyrightJason A. Donenfeld2017-01-101-1/+1
|
* peer: don't use sockaddr_storage to reduce memory usageJason A. Donenfeld2016-12-131-3/+3
|
* device: clean up xmit error pathJason A. Donenfeld2016-12-111-3/+2
|
* send: send packet initiation only after requeuing to prevent raceJason A. Donenfeld2016-11-291-6/+11
|
* headers: cleanup noticesJason A. Donenfeld2016-11-211-1/+1
|
* debug: cleanup skb printingJason A. Donenfeld2016-11-151-5/+1
|
* socket: keep track of src address in sending packetsJason A. Donenfeld2016-11-151-6/+6
|
* send: simplify handshake initiation queueing and introduce lockJason A. Donenfeld2016-11-071-25/+31
|
* debug: support dynamic debug on skb addrJason A. Donenfeld2016-11-061-1/+1
|
* send: remove redundant time stampJason A. Donenfeld2016-11-061-1/+0
|
* socket: big refactoringJason A. Donenfeld2016-11-051-1/+1
|
* send: queue bundles on same CPUJason A. Donenfeld2016-11-041-148/+43
|
* timers: take reference like a lookup tableJason A. Donenfeld2016-11-031-7/+6
|
* timers: only have initiator rekeyJason A. Donenfeld2016-10-191-27/+15
| | | | | | | | | 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-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+1
|
* send: ensure that rekey retries are staggeredexperimental-0.0.20161014Jason A. Donenfeld2016-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Before: t+120: A sends rekey [packet dropped by network congestion] t+125: A sends rekey [packet dropped by network congestion] t+130: A sends rekey t+130: B sends rekey ! race ! After: t+120: A sends rekey [packet dropped by network congestion] t+125: A sends rekey [packet dropped by network congestion] t+130: A sends rekey [packet dropped by network congestion] T+132.5: B sends rekey [packet dropped by network congestion] T+135: A sends rekey [packet dropped by network congestion] T+137.5: B sends rekey ! success, eventually !
* send: requeue jobs for later if padata is fullJason A. Donenfeld2016-10-051-2/+13
|
* Rework headers and includesJason A. Donenfeld2016-09-291-4/+5
|
* send: properly encapsulate ECNJason A. Donenfeld2016-08-291-8/+19
| | | | We're not leaking the DSCP, but we do deal with ECN.
* send: needless debugging checkJason A. Donenfeld2016-08-161-2/+1
|
* timers: move timer calls out of hot loopJason A. Donenfeld2016-07-101-3/+6
| | | | | | We sacrifice a little bit of precision here, but this avoids jockeying around the timers for every packet, when we're sending in bundles anyway to minimize cache misses.
* persistent keepalive: use authenticated keepalivesJason A. Donenfeld2016-07-101-0/+3
|
* keepalives: only queue keepalive when queue is emptyJason A. Donenfeld2016-07-081-6/+9
|
* timers: do not consider keepalives to be data sentJason A. Donenfeld2016-07-081-1/+3
|
* Initial commitJason A. Donenfeld2016-06-251-0/+266